diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2021-04-18 19:43:45 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2021-04-18 19:43:45 +0200 |
| commit | 90d130393faecc48810dfe6daac0e54f101ce713 (patch) | |
| tree | cadd293bc35902c555c3bf4c5532551f67d8c37f /test.py | |
| parent | 478ff36d8e7eccfe19106d0c08a8c0db4ba493bd (diff) | |
| download | geldschieberbot-90d130393faecc48810dfe6daac0e54f101ce713.tar.gz geldschieberbot-90d130393faecc48810dfe6daac0e54f101ce713.zip | |
[cars] add remove command
Diffstat (limited to 'test.py')
| -rwxr-xr-x | test.py | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -406,7 +406,7 @@ alice: self.assertEqual(res.stdout, msg) -class TestCarsAddCmd(unittest.TestCase): +class TestCarsAdd(unittest.TestCase): def setUp(self): reset_state("test/state.json_3users") @@ -471,6 +471,22 @@ foo: self.assertEqual(res.stdout, o) +class TestCarsRemove(unittest.TestCase): + def setUp(self): + reset_state("test/state.json_2cars") + + def test_schieb_car(self): + i = "!cars remove foo" + res = run_bot(self, num[alice], i) + o = 'removed "foo" from the available cars' + self.assertEqual(res.stdout, o) + + i = "!sum foo" + res = run_bot(self, num[alice], i) + o = 'ERROR: name "foo" not registered' + self.assertEqual(res.stdout, o) + + class TestCarPayCmd(unittest.TestCase): def setUp(self): reset_state("test/state.json_2cars") |
