diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2022-07-06 10:17:57 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2022-07-06 10:18:39 +0200 |
| commit | 59b3609e4904910bb2d1be6a95c748b07b777211 (patch) | |
| tree | 2cd4caab1b86a1984d0ffcb7652d3122c9d0edf3 /test.py | |
| parent | 2fe86be4e3b999ec4941284274b586dd0f2fecb7 (diff) | |
| download | geldschieberbot-59b3609e4904910bb2d1be6a95c748b07b777211.tar.gz geldschieberbot-59b3609e4904910bb2d1be6a95c748b07b777211.zip | |
support aliases in tanken command
Move tanken code into Gelschieberbot to simply expand aliases in drives.
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): |
