diff --git a/tests/test_download_source_task.py b/tests/test_download_source_task.py index e625d7b..2a1a946 100644 --- a/tests/test_download_source_task.py +++ b/tests/test_download_source_task.py @@ -1,11 +1,17 @@ -"""Smoke test that the Celery task is registered and routed correctly.""" +"""Smoke test that the FC-3c Celery task is registered and routed correctly. +Mirrors test_tasks_register.py — Celery's `include=[...]` is lazy, so +the task module must be imported explicitly to trigger registration. +""" + +# Side-effect import: the @celery.task decorator on download_source fires +# at module import time and registers the task with the global instance. +import backend.app.tasks.download # noqa: F401 from backend.app.celery_app import celery def test_download_source_is_registered(): - name = "backend.app.tasks.download.download_source" - assert name in celery.tasks + assert "backend.app.tasks.download.download_source" in celery.tasks def test_download_source_routes_to_download_queue():