From a3d4cdde5b265317b93d7ea974e2cba485cf4d82 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Wed, 23 Nov 2016 21:00:35 +0100 Subject: [PATCH] Use render_servers instead of render_template --- tsstats/tests/test_template.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tsstats/tests/test_template.py b/tsstats/tests/test_template.py index 9d92342..d0cf500 100644 --- a/tsstats/tests/test_template.py +++ b/tsstats/tests/test_template.py @@ -5,12 +5,13 @@ from os import remove import pytest from bs4 import BeautifulSoup -from tsstats.log import _parse_details -from tsstats.template import render_template +from tsstats.log import _parse_details, Server +from tsstats.template import render_servers from tsstats.utils import filter_threshold, seconds_to_text, sort_clients output_path = 'tsstats/tests/res/output.html' clients = _parse_details('tsstats/tests/res/test.log', online_dc=False) +servers = [Server(1, clients)] logger = logging.getLogger('tsstats') @@ -24,13 +25,13 @@ def output(request): @pytest.fixture def soup(output): - render_template(clients, output_path) + render_servers(servers, output_path) return BeautifulSoup(open(output_path), 'html.parser') def test_debug(output): logger.setLevel(logging.DEBUG) - render_template(clients, output_path) + render_servers(servers, output_path) logger.setLevel(logging.INFO) soup = BeautifulSoup(open(output_path), 'html.parser') # check debug-label presence