add main-test

This commit is contained in:
Thor77 2015-07-31 22:24:44 +02:00
parent 5ea493329d
commit 2d90d77b24
2 changed files with 8 additions and 1 deletions

3
tests/res/config.ini Normal file
View File

@ -0,0 +1,3 @@
[General]
logfile = tests/res/test.log
outputfile = tests/res/output.html

View File

@ -1,10 +1,14 @@
from tsstats import parse_logs
from tsstats import parse_logs, main
from os import remove
from nose.tools import raises
clients = parse_logs('tests/res/test.log')
def test_main():
main(config_path='tests/res/config.ini')
def test_length():
assert len(clients.clients_by_id) == 2
assert len(clients.clients_by_uid) == 1