Enable pytest in docker
The DJANGO_SETTINGS_MODULE is set in the develop container, so the tests.settings from the setup.cfg was ignored. Executing pytest with DJANGO_SETTINGS_MODULE=tests.settings pytest works fine. The line added in the setup.cfg takes over precedence: It auto-adds the --ds parameter which has a higher precedence than the environment variable. Also removed an unnecessary setting.
This commit is contained in:
parent
7bbd8688a2
commit
f897bb01a3
@ -34,6 +34,7 @@ disallow_untyped_defs = true
|
|||||||
|
|
||||||
[tool:pytest]
|
[tool:pytest]
|
||||||
DJANGO_SETTINGS_MODULE = tests.settings
|
DJANGO_SETTINGS_MODULE = tests.settings
|
||||||
|
addopts = --ds=tests.settings
|
||||||
testpaths = tests/
|
testpaths = tests/
|
||||||
filterwarnings =
|
filterwarnings =
|
||||||
ignore:RemovedInDjango30Warning
|
ignore:RemovedInDjango30Warning
|
||||||
|
@ -70,9 +70,6 @@ MEDIA_ROOT = os.path.join(OPENSLIDES_USER_DATA_PATH, "")
|
|||||||
|
|
||||||
PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"]
|
PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"]
|
||||||
|
|
||||||
# Deactivate restricted_data_cache
|
|
||||||
RESTRICTED_DATA_CACHE = False
|
|
||||||
|
|
||||||
REST_FRAMEWORK = {"TEST_REQUEST_DEFAULT_FORMAT": "json"}
|
REST_FRAMEWORK = {"TEST_REQUEST_DEFAULT_FORMAT": "json"}
|
||||||
|
|
||||||
ENABLE_ELECTRONIC_VOTING = True
|
ENABLE_ELECTRONIC_VOTING = True
|
||||||
|
Loading…
Reference in New Issue
Block a user