| Total Complexity | 2 | 
| Total Lines | 18 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | """  | 
            ||
| 2 | Tests for the Marvin Smile action  | 
            ||
| 3 | """  | 
            ||
| 4 | |||
| 5 | from unittest import mock  | 
            ||
| 6 | |||
| 7 | from test_action import ActionTest  | 
            ||
| 8 | from irc2phpbb import marvin_actions  | 
            ||
| 9 | |||
| 10 | class SmileTest(ActionTest):  | 
            ||
| 11 | """Tests for the Marvin Smile action"""  | 
            ||
| 12 | def testSmile(self):  | 
            ||
| 13 | """Test that marvin can smile"""  | 
            ||
| 14 |         with mock.patch("irc2phpbb.marvin_actions.random") as r: | 
            ||
| 15 | r.randint.return_value = 1  | 
            ||
| 16 | self.assertStringsOutput(marvin_actions.marvinSmile, "le lite?", "smile", 1)  | 
            ||
| 17 | self.assertActionSilent(marvin_actions.marvinSmile, "sur idag?")  | 
            ||
| 18 |