diff --git a/.circleci/config.yml b/.circleci/config.yml index e65acb0ccc118a07422f25920b368187cc38ba60..53914919ffc4f880e16cdd641148877f02eca1e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: DATABASE_URL: postgresql://root@localhost/opentech?sslmode=disable PGHOST: localhost PGUSER: root - DJANGO_SETTINGS_MODULE: opentech.settings.production + DJANGO_SETTINGS_MODULE: opentech.settings.test NPM_CONFIG_PRODUCTION: false SEND_MESSAGES: false diff --git a/.travis.yml b/.travis.yml index e726c001756226ce11e747af139a848cec176e52..ca54666146cd5a9182161fe5fb6d36a1dcbb74ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ addons: env: global: - - DJANGO_SETTINGS_MODULE=opentech.settings.production + - DJANGO_SETTINGS_MODULE=opentech.settings.test - DATABASE_URL=postgres://postgres@localhost/test_db before_script: diff --git a/opentech/settings/production.py b/opentech/settings/production.py index 4c4978cc6d15502fbf0adca40180ea4f7f71e5bb..c4a21eedde2ef80a89bd01f0e8142a096bef376f 100644 --- a/opentech/settings/production.py +++ b/opentech/settings/production.py @@ -1,6 +1,5 @@ import os -# import raven import django_heroku from .base import * # noqa diff --git a/opentech/settings/test.py b/opentech/settings/test.py new file mode 100644 index 0000000000000000000000000000000000000000..89f1c83c93e6305a3608512f320cef7c82958407 --- /dev/null +++ b/opentech/settings/test.py @@ -0,0 +1,9 @@ +from .production import * # noqa + +# Should only include explicit testing settings + +SECRET_KEY = 'NOT A SECRET' + +# Need this to ensure white noise doesn't kill the speed of testing +# http://whitenoise.evans.io/en/latest/django.html#whitenoise-makes-my-tests-run-slow +WHITENOISE_AUTOREFRESH = True diff --git a/requirements.txt b/requirements.txt index 8233fc584971641bffdcf16e7b814df1dd904202..ad50d6e161ffb2d8218113fcaf80fe5a9d28a882 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,7 +31,7 @@ django_select2==6.0.1 dj-database-url==0.5.0 django-basic-auth-ip-whitelist==0.2.1 django-heroku==0.3.1 -whitenoise==3.3.1 +whitenoise==4.0 gunicorn==19.9.0 ConcurrentLogHandler==0.9.1 raven==6.9.0