3👍
✅
Use CELERY_ALWAYS_EAGER
settings for test run.
It make the function to be called immediately instead of running it as a task.
Example django settings snippet:
if 'test' in sys.argv:
CELERY_ALWAYS_EAGER = True
Source:stackexchange.com