From 87bb7785724c338f9347eb367fb3041ae222ab76 Mon Sep 17 00:00:00 2001 From: Matthew Gamble Date: Tue, 28 Feb 2017 08:48:13 +1100 Subject: [PATCH] Improve debug mode template test, reduce line length --- tsstats/tests/test_template.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsstats/tests/test_template.py b/tsstats/tests/test_template.py index 57ca92f..d95dd28 100644 --- a/tsstats/tests/test_template.py +++ b/tsstats/tests/test_template.py @@ -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