From e08bbdc902bd8fbd14191c5f760150f71a728ed0 Mon Sep 17 00:00:00 2001 From: Matthew Gamble Date: Tue, 7 Mar 2017 09:27:57 +1100 Subject: [PATCH] Reformat testing code --- tsstats/tests/test_template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsstats/tests/test_template.py b/tsstats/tests/test_template.py index d95dd28..a8d6e9f 100644 --- a/tsstats/tests/test_template.py +++ b/tsstats/tests/test_template.py @@ -35,8 +35,8 @@ def test_debug(output): logger.setLevel(logging.INFO) soup = BeautifulSoup(open(output_path), 'html.parser') # check debug-label presence - debug_element = soup.find('nav').find('div', id='main-nav').find('span') - assert debug_element.text == 'debug mode' + assert soup.find('nav').find('div', id='main-nav').find('span').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