diff options
Diffstat (limited to 'test.py')
| -rwxr-xr-x | test.py | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -106,6 +106,13 @@ class TestRegCmd(unittest.TestCase): res = run_bot(self, num[alice], "!reg nase 03") self.assertEqual(res.stdout, 'ERROR: not in form "!reg name"') + def test_numerical_reg(self): + res = run_bot(self, num[alice], "!reg 9") + self.assertEqual(res.stdout, 'ERROR: pure numerical names are not allowed') + + res = run_bot(self, num[alice], "!reg 9.7") + self.assertEqual(res.stdout, 'ERROR: pure numerical names are not allowed') + def test_additional_reg(self): res = run_bot(self, num[alice], "!reg "+alice) self.assertEqual(res.stdout, 'Happy geldschiebing {}!'.format(alice)) @@ -317,6 +324,16 @@ alice: \t<- charlie 10.00 \tBalance: 10.00""" self.assertEqual(res.stdout, msg) + + def test_split_with_double_user(self): + res = run_bot(self, num[alice], f"!split 30 {charlie} {charlie}") + msg = \ +"""Split 30.00 between 3 -> 10.00 each +New Balance: +alice: +\t<- charlie 20.00 +\tBalance: 20.00""" + self.assertEqual(res.stdout, msg) def test_split(self): res = run_bot(self, num[alice], "!split 30 " + bob + " " + charlie) |
