Always use test settings in pytest

You can alternatively use DJANGO_SETTINGS_MODULE, but this is overridden
by the environment variable of the same name. In order to always run it
with test settings, regardless of the environment variable use --ds.

https://pytest-django.readthedocs.io/en/latest/configuring_django.html
This commit is contained in:
Dani Hodovic 2019-07-08 14:14:59 +08:00
parent 64ef6e835c
commit f02aa463a7
No known key found for this signature in database
GPG Key ID: 15433E10A71D1221

View File

@ -1,5 +1,5 @@
[pytest]
DJANGO_SETTINGS_MODULE=config.settings.test
addopts = --ds=config.settings.test
{%- if cookiecutter.js_task_runner != 'None' %}
norecursedirs = node_modules
{%- endif %}