Celerybeat schedules can and will fail during runtime if they are configured incorrectly. This adds some testing to catch this scenario.
@@ -15,3 +15,5 @@ def test_validate_celerybeat_schedule(name, entry):
assert entry.task in app.tasks
mod_name = app.tasks[entry.task].__module__
assert mod_name in settings.CELERY_IMPORTS, f"{mod_name} is missing from CELERY_IMPORTS"
+ # Test that the schedules are valid. Throws a RuntimeError if one is invalid.
+ entry.is_due()