aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/tests/tools.py')
-rw-r--r--mediagoblin/tests/tools.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/mediagoblin/tests/tools.py b/mediagoblin/tests/tools.py
index b1fe56a0..515bccd4 100644
--- a/mediagoblin/tests/tools.py
+++ b/mediagoblin/tests/tools.py
@@ -47,10 +47,12 @@ class BadCeleryEnviron(Exception): pass
def get_test_app(dump_old_app=True):
- if os.environ.get('CELERY_CONFIG_MODULE'):
+ if not os.environ.get('CELERY_CONFIG_MODULE') == \
+ 'mediagoblin.celery_setup.from_tests':
raise BadCeleryEnviron(
- u"Sorry, you *ABSOLUTELY MUST *NOT* run nosetests with the\n"
- u"CELERY_CONFIG_MODULE set to anything.")
+ u"Sorry, you *absolutely* must run nosetests with the\n"
+ u"mediagoblin.celery_setup.from_tests module. Like so:\n"
+ u"$ CELERY_CONFIG_MODULE=mediagoblin.celery_setup.from_tests ./bin/nosetests")
global MGOBLIN_APP
global CELERY_SETUP