kopia lustrzana https://github.com/jedie/PyInventory
setup DEBUG in tests
rodzic
edbf7cf835
commit
60cc68602a
|
@ -134,6 +134,10 @@ omit = [".*"]
|
||||||
# https://docs.pytest.org/en/latest/customize.html#pyproject-toml
|
# https://docs.pytest.org/en/latest/customize.html#pyproject-toml
|
||||||
minversion = "6.0"
|
minversion = "6.0"
|
||||||
DJANGO_SETTINGS_MODULE="inventory_project.settings.tests"
|
DJANGO_SETTINGS_MODULE="inventory_project.settings.tests"
|
||||||
|
|
||||||
|
# Don't overwrite settings.DEBUG:
|
||||||
|
django_debug_mode="keep"
|
||||||
|
|
||||||
norecursedirs = ".* .git __pycache__ coverage* dist htmlcov volumes"
|
norecursedirs = ".* .git __pycache__ coverage* dist htmlcov volumes"
|
||||||
# sometimes helpfull "addopts" arguments:
|
# sometimes helpfull "addopts" arguments:
|
||||||
# -vv
|
# -vv
|
||||||
|
|
|
@ -38,6 +38,7 @@ print(f'BASE_PATH:{BASE_PATH}')
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
TEMPLATE_DEBUG = False
|
||||||
|
|
||||||
# Serve static/media files by Django?
|
# Serve static/media files by Django?
|
||||||
# In production Caddy should serve this!
|
# In production Caddy should serve this!
|
||||||
|
|
|
@ -11,7 +11,7 @@ from inventory_project.settings.base import * # noqa
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
TEMPLATE_DEBUG = True
|
||||||
|
|
||||||
# Serve static/media files for local development:
|
# Serve static/media files for local development:
|
||||||
SERVE_FILES = True
|
SERVE_FILES = True
|
||||||
|
|
|
@ -12,7 +12,11 @@ DATABASES = {
|
||||||
|
|
||||||
SECRET_KEY = 'No individual secret for tests ;)'
|
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'] = (
|
LOGGING['formatters']['colored']['format'] = (
|
||||||
'%(log_color)s%(name)s %(levelname)8s %(cut_path)s:%(lineno)-3s %(message)s'
|
'%(log_color)s%(name)s %(levelname)8s %(cut_path)s:%(lineno)-3s %(message)s'
|
||||||
|
|
Ładowanie…
Reference in New Issue