aboutsummaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/test.py b/test.py
index d279e0b..e839536 100755
--- a/test.py
+++ b/test.py
@@ -514,6 +514,30 @@ charlie:
\t<- bob 3.00
\tBalance: 6.00""")
+ def test_tanken_all(self):
+ res = run_bot(self, num[alice], "!tanken 10\n10 all")
+ self.assertEqual(res.stdout, \
+"""alice: 10km = fuel: 3.33, service charge: 0.00
+bob: 10km = fuel: 3.33, service charge: 0.00
+charlie: 10km = fuel: 3.33, service charge: 0.00
+New Balance:
+alice:
+\t<- bob 3.33
+\t<- charlie 3.33
+\tBalance: 6.66""")
+
+ def test_tanken_alias(self):
+ run_bot(self, num[alice], f"!alias alob {alice} {bob}")
+ res = run_bot(self, num[charlie], "!tanken 8\n10 alob")
+ self.assertEqual(res.stdout, \
+"""alice: 10km = fuel: 4.00, service charge: 0.00
+bob: 10km = fuel: 4.00, service charge: 0.00
+New Balance:
+charlie:
+\t<- alice 4.00
+\t<- bob 4.00
+\tBalance: 8.00""")
+
class TestCarsAdd(unittest.TestCase):