Add testcase for #3 (encoding issues)
This commit is contained in:
parent
db24696c47
commit
1ec0a37480
|
@ -0,0 +1,2 @@
|
|||
2015-05-18 15:55:23.456679|INFO |VirtualServerBase| 3| client connected 'Cläönt1'(id:1) from 1.2.3.4:1234
|
||||
2015-05-18 16:00:14.951191|INFO |VirtualServerBase| 3| client disconnected 'Cläönt1'(id:1) reason 'reasonmsg=ByeBye!'
|
|
@ -1,10 +1,13 @@
|
|||
from datetime import datetime, timedelta
|
||||
from os import remove
|
||||
from time import sleep
|
||||
|
||||
import pytest
|
||||
|
||||
from tsstats.exceptions import InvalidLog
|
||||
from tsstats.log import TimedLog, _bundle_logs, _parse_details, parse_logs
|
||||
from tsstats.template import render_template
|
||||
from tsstats.tests.test_template import output_path
|
||||
|
||||
testlog_path = 'tsstats/tests/res/test.log'
|
||||
|
||||
|
@ -87,3 +90,9 @@ def test_parse_logs():
|
|||
def test_parse_groups():
|
||||
clients = _parse_details('tsstats/tests/res/test.log.groups')
|
||||
assert len(clients) == 0
|
||||
|
||||
|
||||
def test_parse_utf8():
|
||||
clients = parse_logs(testlog_path + '.utf8')['']
|
||||
render_template(clients, output_path)
|
||||
remove(output_path)
|
||||
|
|
Loading…
Reference in New Issue