From d04115253559a675b164a209ca1fdd0353136156 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 1 Jul 2021 12:05:30 +0200 Subject: add seperate full-sum command and print only the senders sum per default --- test.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test.py') diff --git a/test.py b/test.py index 3f74559..0120c89 100755 --- a/test.py +++ b/test.py @@ -277,6 +277,14 @@ bob: def test_summary(self): reset_state("test/state.json_transactions1") res = run_bot(self, num[alice], "!sum") + self.assertEqual( + res.stdout, + 'Summary:\nalice:\n\t-> bob 0.01\n\t-> charlie 1.00\n\tBalance: -1.01' + ) + + def test_full_summary(self): + reset_state("test/state.json_transactions1") + res = run_bot(self, num[alice], "!full-sum") summary = \ """Summary: alice: @@ -293,6 +301,11 @@ charlie: \tBalance: 43.00""" self.assertEqual(res.stdout, summary) + def test_full_summary_with_args(self): + reset_state("test/state.json_transactions1") + res = run_bot(self, num[alice], "!full-sum foo") + self.assertEqual(res.stdout, 'ERROR: full-sum takes no arguments') + class TestMisc(unittest.TestCase): def test_unknown_command(self): @@ -717,6 +730,7 @@ Car foo: \tBalance: 1.20""" self.assertEqual(res.stdout, o) + class TestTransferCmd(unittest.TestCase): def setUp(self): reset_state("test/state.json_3users") @@ -925,6 +939,7 @@ alice <- 1.00 charlie self.assertEqual(res.stdout, msg) compare_state("test/state.json_3users") + class TestScheduleCmd(unittest.TestCase): def setUp(self): reset_state("test/state.json_3users") -- cgit v1.2.3