From 80df2c02f0c2c466a2a95ba8255269515b7cb8b0 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Thu, 27 Oct 2016 00:02:17 +0200 Subject: [PATCH] Add testcase for logs with server/clientgroup-actions --- tsstats/tests/res/test.log.groups | 3 +++ tsstats/tests/test_log.py | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 tsstats/tests/res/test.log.groups diff --git a/tsstats/tests/res/test.log.groups b/tsstats/tests/res/test.log.groups new file mode 100644 index 0000000..7230b6f --- /dev/null +++ b/tsstats/tests/res/test.log.groups @@ -0,0 +1,3 @@ +2016-03-06 18:34:52.674929|INFO |VirtualServer |1 |client 'Client1'(id:1) was added to channelgroup 'Channelgroup1'(id:1) by client 'Client2'(id:2) in channel 'Channel1'(id:1) +2016-02-20 11:11:28.451329|INFO |VirtualServer |1 |client (id:1) was added to servergroup 'Servergroup1'(id:1) by client 'Client2'(id:2) +2016-02-19 14:35:00.253289|INFO |VirtualServer |1 |client (id:1) was removed from servergroup 'Servergroup1'(id:1) by client 'Client2'(id:2) diff --git a/tsstats/tests/test_log.py b/tsstats/tests/test_log.py index 1dc1689..5e10b26 100644 --- a/tsstats/tests/test_log.py +++ b/tsstats/tests/test_log.py @@ -82,3 +82,8 @@ def test_log_client_online(): def test_parse_logs(): assert len(_parse_details(testlog_path)) ==\ len(parse_logs(testlog_path)['']) + + +def test_parse_groups(): + clients = _parse_details('tsstats/tests/res/test.log.groups') + assert len(clients) == 0