Use parse_logs instead of _parse_details

because _parse_details is not available anymore
This commit is contained in:
Thor77 2017-09-09 17:35:55 +02:00
parent df268f1c2a
commit 147c41ffce
1 changed files with 5 additions and 4 deletions

View File

@ -2,14 +2,15 @@ import logging
import pendulum import pendulum
import pytest import pytest
from bs4 import BeautifulSoup
from tsstats.log import Server, _parse_details from bs4 import BeautifulSoup
from tsstats.log import parse_logs
from tsstats.template import render_servers from tsstats.template import render_servers
from tsstats.utils import filter_threshold, seconds_to_text, sort_clients from tsstats.utils import filter_threshold, seconds_to_text, sort_clients
clients = _parse_details('tsstats/tests/res/test.log', online_dc=False) servers = list(parse_logs('tsstats/tests/res/test.log', online_dc=False))
servers = [Server(1, clients)] servers[0] = servers[0]._replace(sid=1) # add missing sid to server object
clients = servers[0].clients
logger = logging.getLogger('tsstats') logger = logging.getLogger('tsstats')