Blame view

src/scripts/celery_test.sh 581 Bytes
fafae58f   haribo   Cleaned directory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#
## 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