| Conditions | 3 |
| Total Lines | 12 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """ |
||
| 13 | def testVideoOfToday(self): |
||
| 14 | """Test that marvin can link to a different video each day of the week""" |
||
| 15 | with mock.patch("irc2phpbb.marvin_actions.datetime") as dt: |
||
| 16 | for d in range(1, 8): |
||
| 17 | day = date(2024, 11, 25) + timedelta(days=d) |
||
| 18 | dt.date.today.return_value = day |
||
| 19 | weekday = day.strftime("%A") |
||
| 20 | weekdayPhrase = self.strings.get("video-of-today").get(weekday).get("message") |
||
| 21 | videoPhrase = self.strings.get("video-of-today").get(weekday).get("url") |
||
| 22 | response = f"{weekdayPhrase} En passande video är {videoPhrase}" |
||
| 23 | self.assertActionOutput(marvin_actions.marvinVideoOfToday, "dagens video", response) |
||
| 24 | self.assertActionSilent(marvin_actions.marvinVideoOfToday, "videoidag") |
||
| 25 |