Test the daytime filter on all days of the week
@@ -114,7 +114,12 @@ def test_filter_day_time():
"seal/days": "mon,tue,wed,thu,fri,sat,sun"
}
- now = datetime.now().replace(microsecond=0)
+ for day in range(7):
+ now = datetime.now()
+ # check that it works for all the days of the week, as specified above
+ now.replace(day=day+1)
+ # set the microseconds to 0, to pass the inclusive start
+ now.replace(microsecond=0)
test_cases = [
(now.replace(hour=8, minute=0, second=0), False, "far too early"),
(now.replace(hour=9, minute=59, second=59), False, "just too early"),
