From caa9094be99593dded410875dc2302cec0f8260a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Mon, 2 May 2022 23:34:25 +0200 Subject: [PATCH] Fix test_calc_countdown --- tests/test_discord_reminder_bot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_discord_reminder_bot.py b/tests/test_discord_reminder_bot.py index c099a45..c4d639b 100644 --- a/tests/test_discord_reminder_bot.py +++ b/tests/test_discord_reminder_bot.py @@ -55,6 +55,8 @@ class TestClass: def test_calc_countdown(self): """Check if calc_countdown returns days, hours and minutes.""" # FIXME: This will break when there is 0 seconds/hours/days left - pattern = re.compile(r"\d* days, \d* hours, \d* minutes") + pattern = re.compile( + r"\d* (day|days), \d* (hour|hours). \d* (minute|minutes)", + ) countdown = calc_countdown(self.job) assert pattern.match(countdown)