fix(fc3c): explicit import of download task module in registration test
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user