setup DEBUG in tests

pull/84/head
JensDiemer 2021-12-05 16:10:54 +01:00
rodzic edbf7cf835
commit 60cc68602a
4 zmienionych plików z 11 dodań i 2 usunięć

Wyświetl plik

@ -134,6 +134,10 @@ omit = [".*"]
# https://docs.pytest.org/en/latest/customize.html#pyproject-toml
minversion = "6.0"
DJANGO_SETTINGS_MODULE="inventory_project.settings.tests"
# Don't overwrite settings.DEBUG:
django_debug_mode="keep"
norecursedirs = ".* .git __pycache__ coverage* dist htmlcov volumes"
# sometimes helpfull "addopts" arguments:
# -vv

Wyświetl plik

@ -38,6 +38,7 @@ print(f'BASE_PATH:{BASE_PATH}')
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
TEMPLATE_DEBUG = False
# Serve static/media files by Django?
# In production Caddy should serve this!

Wyświetl plik

@ -11,7 +11,7 @@ from inventory_project.settings.base import * # noqa
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
# Serve static/media files for local development:
SERVE_FILES = True

Wyświetl plik

@ -12,7 +12,11 @@ DATABASES = {
SECRET_KEY = 'No individual secret for tests ;)'
DEBUG = True
# Run the tests as on production: Without DBEUG:
DEBUG = False
TEMPLATE_DEBUG = False
ALLOWED_HOSTS = ('127.0.0.1', '0.0.0.0', 'localhost')
LOGGING['formatters']['colored']['format'] = (
'%(log_color)s%(name)s %(levelname)8s %(cut_path)s:%(lineno)-3s %(message)s'