diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2021-07-01 12:05:30 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2021-07-01 12:05:30 +0200 |
| commit | d04115253559a675b164a209ca1fdd0353136156 (patch) | |
| tree | f26aa68ca6f0d5c9720dd59bf0c5fe17035d9154 /test.py | |
| parent | 90d130393faecc48810dfe6daac0e54f101ce713 (diff) | |
| download | geldschieberbot-d04115253559a675b164a209ca1fdd0353136156.tar.gz geldschieberbot-d04115253559a675b164a209ca1fdd0353136156.zip | |
add seperate full-sum command and print only the senders sum per default
Diffstat (limited to 'test.py')
| -rwxr-xr-x | test.py | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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") |
