add idmap-load and conifig not found tests

This commit is contained in:
Thor77 2015-07-31 22:52:25 +02:00
parent 2d90d77b24
commit 6448cc60f0
1 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
from tsstats import parse_logs, main
from tsstats import parse_logs, main, exceptions
from os import remove
from nose.tools import raises
@ -9,6 +9,15 @@ def test_main():
main(config_path='tests/res/config.ini')
@raises(exceptions.ConfigNotFound)
def test_main_config_not_found():
main()
def test_main_idmap_load():
main(config_path='tests/res/config.ini', id_map_path='tests/res/id_map.json')
def test_length():
assert len(clients.clients_by_id) == 2
assert len(clients.clients_by_uid) == 1