From 3d532dae01e84c75ff3a4376fbfce3e15c5a6d1d Mon Sep 17 00:00:00 2001 From: Basraah Date: Tue, 9 Jan 2018 12:11:54 +1000 Subject: [PATCH] Fix celery in tests There's actually a better way to structure tests involving celery since 4.0, but that can wait for some time in the future. --- tests/celery.py | 2 +- tests/settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/celery.py b/tests/celery.py index 6492058a..d2a57085 100644 --- a/tests/celery.py +++ b/tests/celery.py @@ -10,7 +10,7 @@ app = Celery('devauth') # Using a string here means the worker don't have to serialize # the configuration object to child processes. -app.config_from_object('django.conf:settings') +app.config_from_object('django.conf:settings', namespace='CELERY') # Load task modules from all registered Django app configs. app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) diff --git a/tests/settings.py b/tests/settings.py index b0304290..b87f1020 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -14,7 +14,7 @@ NOSE_ARGS = [ ] # Celery configuration -CELERY_ALWAYS_EAGER = True # Forces celery to run locally for testing +CELERY_TASK_ALWAYS_EAGER = True # Forces celery to run locally for testing INSTALLED_APPS += [ 'allianceauth.eveonline.autogroups',