diff options
Diffstat (limited to 'test.py')
| -rwxr-xr-x | test.py | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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): |
