aboutsummaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test.py b/test.py
index 929605c..56f6949 100755
--- a/test.py
+++ b/test.py
@@ -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)