"""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(): assert "backend.app.tasks.download.download_source" in celery.tasks def test_download_source_routes_to_download_queue(): routes = celery.conf.task_routes assert "backend.app.tasks.download.*" in routes assert routes["backend.app.tasks.download.*"]["queue"] == "download"