1
0
Fork 0
mirror of https://github.com/Thor77/TeamspeakStats.git synced 2025-08-13 17:38:45 -04:00

Improve debug mode template test, reduce line length

This commit is contained in:
Matthew Gamble 2017-02-28 08:48:13 +11:00
parent e9f1de310c
commit 87bb778572
No known key found for this signature in database
GPG key ID: B5D06189C3995B3B

View file

@ -35,7 +35,8 @@ def test_debug(output):
logger.setLevel(logging.INFO)
soup = BeautifulSoup(open(output_path), 'html.parser')
# check debug-label presence
assert soup.find('nav').find(id='main-nav').find('span').text == 'debug mode'
debug_element = soup.find('nav').find('div', id='main-nav').find('span')
assert debug_element.text == 'debug mode'
for client_item in soup.find('ul', id='1.onlinetime').find_all('li'):
nick = client_item.find('span').text
# check for right identifier