# ## To be used for tests using celery (asynchronous) ## BEWARE : This script launches tests on the production database # # ## Usage : celery_test.sh app.tests[.ClassTest[.test_name]] # USAGE_MSG="Usage : celery_test.sh app.tests[.ClassTest[.test_name]]" if [ "$#" -eq 0 ]; then echo $USAGE_MSG exit fi SCRIPT_PATH=$0 SCRIPT_PATH=${SCRIPT_PATH%/*} cd $SCRIPT_PATH/.. sed -i -e "s/CELERY_TEST = False/CELERY_TEST = True/g" pyros/settings.py python manage.py test "$@" --keepdb --nomigrations sed -i -e "s/CELERY_TEST = True/CELERY_TEST = False/g" pyros/settings.py