Fix test_calc_countdown

This commit is contained in:
2022-05-02 23:34:25 +02:00
parent 7025d11f70
commit caa9094be9

View File

@ -55,6 +55,8 @@ class TestClass:
def test_calc_countdown(self): def test_calc_countdown(self):
"""Check if calc_countdown returns days, hours and minutes.""" """Check if calc_countdown returns days, hours and minutes."""
# FIXME: This will break when there is 0 seconds/hours/days left # 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) countdown = calc_countdown(self.job)
assert pattern.match(countdown) assert pattern.match(countdown)