| Conditions | 5 |
| Total Lines | 9 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """ |
||
| 12 | def testSayHello(self): |
||
| 13 | """Test that marvin responds to greetings""" |
||
| 14 | with mock.patch("irc2phpbb.marvin_actions.random") as r: |
||
| 15 | for skey, s in enumerate(self.strings.get("smile")): |
||
| 16 | for hkey, h in enumerate(self.strings.get("hello")): |
||
| 17 | for fkey, f in enumerate(self.strings.get("friendly")): |
||
| 18 | r.randint.side_effect = [skey, hkey, fkey] |
||
| 19 | self.assertActionOutput(marvin_actions.marvinSayHi, "hej", f"{s} {h} {f}") |
||
| 20 | self.assertActionSilent(marvin_actions.marvinSayHi, "korsning") |
||
| 21 |