| Conditions | 3 |
| Total Lines | 12 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """ |
||
| 12 | def testQuote(self): |
||
| 13 | """Test that marvin can quote The Hitchhikers Guide to the Galaxy""" |
||
| 14 | with mock.patch("irc2phpbb.marvin_actions.random") as r: |
||
| 15 | r.randint.return_value = 1 |
||
| 16 | self.assertStringsOutput(marvin_actions.marvinQuote, "ge os ett citat", "hitchhiker", 1) |
||
| 17 | self.assertStringsOutput(marvin_actions.marvinQuote, "filosofi", "hitchhiker", 1) |
||
| 18 | self.assertStringsOutput(marvin_actions.marvinQuote, "filosofera", "hitchhiker", 1) |
||
| 19 | self.assertActionSilent(marvin_actions.marvinQuote, "noquote") |
||
| 20 | |||
| 21 | for i,_ in enumerate(self.strings.get("hitchhiker")): |
||
| 22 | r.randint.return_value = i |
||
| 23 | self.assertStringsOutput(marvin_actions.marvinQuote, "quote", "hitchhiker", i) |
||
| 24 |