mirror of
https://github.com/Thor77/TeamspeakStats.git
synced 2025-07-08 00:18:43 -04:00
add main-test
This commit is contained in:
parent
5ea493329d
commit
2d90d77b24
2 changed files with 8 additions and 1 deletions
tests
3
tests/res/config.ini
Normal file
3
tests/res/config.ini
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[General]
|
||||||
|
logfile = tests/res/test.log
|
||||||
|
outputfile = tests/res/output.html
|
|
@ -1,10 +1,14 @@
|
||||||
from tsstats import parse_logs
|
from tsstats import parse_logs, main
|
||||||
from os import remove
|
from os import remove
|
||||||
from nose.tools import raises
|
from nose.tools import raises
|
||||||
|
|
||||||
clients = parse_logs('tests/res/test.log')
|
clients = parse_logs('tests/res/test.log')
|
||||||
|
|
||||||
|
|
||||||
|
def test_main():
|
||||||
|
main(config_path='tests/res/config.ini')
|
||||||
|
|
||||||
|
|
||||||
def test_length():
|
def test_length():
|
||||||
assert len(clients.clients_by_id) == 2
|
assert len(clients.clients_by_id) == 2
|
||||||
assert len(clients.clients_by_uid) == 1
|
assert len(clients.clients_by_uid) == 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue