From 2d90d77b24cd8aadf94647a681e5bb9d573cf5c6 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Fri, 31 Jul 2015 22:24:44 +0200 Subject: [PATCH] add main-test --- tests/res/config.ini | 3 +++ tests/test_general.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tests/res/config.ini diff --git a/tests/res/config.ini b/tests/res/config.ini new file mode 100644 index 0000000..a8740ac --- /dev/null +++ b/tests/res/config.ini @@ -0,0 +1,3 @@ +[General] +logfile = tests/res/test.log +outputfile = tests/res/output.html diff --git a/tests/test_general.py b/tests/test_general.py index 142adf0..8ea7cbd 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -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