diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-06-19 16:43:23 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-06-19 16:43:23 -0500 |
commit | eaca78748cd705b8ac7d987fc7e8a852eb690129 (patch) | |
tree | d70bcd9e7b864056eb8fc223d0d058e40a6fea51 /mediagoblin/tests/tools.py | |
parent | 68bf5b19420c5a5e28e33e57b2690442893adc33 (diff) | |
download | mediagoblin-eaca78748cd705b8ac7d987fc7e8a852eb690129.tar.lz mediagoblin-eaca78748cd705b8ac7d987fc7e8a852eb690129.tar.xz mediagoblin-eaca78748cd705b8ac7d987fc7e8a852eb690129.zip |
Need to run nosetests with CELERY_CONFIG_MODULE set to from_tests again.
Basically, if we don't do this celery sets itself up before it should
and improperly. :\
Diffstat (limited to 'mediagoblin/tests/tools.py')
-rw-r--r-- | mediagoblin/tests/tools.py | 8 |
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 |