1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-07 22:00:12 +02:00

Cover also settings files, keep 100% coverage by ignoring production files

This commit is contained in:
Yohann D'ANELLO
2020-11-03 19:13:33 +01:00
parent fa368a399a
commit 1ddf39f296
11 changed files with 75 additions and 35 deletions

View File

@ -195,7 +195,7 @@ HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'
_db_type = os.getenv('DJANGO_DB_TYPE', 'sqlite').lower()
if _db_type == 'mysql' or _db_type.startswith('postgres') or _db_type == 'psql':
if _db_type == 'mysql' or _db_type.startswith('postgres') or _db_type == 'psql': # pragma: no cover
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql' if _db_type == 'mysql' else 'django.db.backends.postgresql_psycopg2',
@ -214,7 +214,7 @@ else:
}
}
if os.getenv("CORRES2MATH_STAGE", "dev") == "prod":
if os.getenv("CORRES2MATH_STAGE", "dev") == "prod": # pragma: no cover
from .settings_prod import * # noqa: F401,F403
else:
from .settings_dev import * # noqa: F401,F403