Disable django-debug-toolbar when running tests
This commit is contained in:
parent
9f24286701
commit
31c9a9b13d
@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from django.core import validators
|
from django.core import validators
|
||||||
@ -303,8 +304,15 @@ class Dev(NonCIBase):
|
|||||||
DEBUG = values.BooleanValue(True)
|
DEBUG = values.BooleanValue(True)
|
||||||
INTERNAL_IPS = ["127.0.0.1"]
|
INTERNAL_IPS = ["127.0.0.1"]
|
||||||
|
|
||||||
INSTALLED_APPS = NonCIBase.INSTALLED_APPS + ["debug_toolbar", "django_extensions"]
|
INSTALLED_APPS = NonCIBase.INSTALLED_APPS + ["django_extensions"]
|
||||||
MIDDLEWARE = ["debug_toolbar.middleware.DebugToolbarMiddleware"] + Base.MIDDLEWARE
|
|
||||||
|
# bit of a hack to disable debug toolbar when running tests
|
||||||
|
if DEBUG and "test" not in sys.argv:
|
||||||
|
INSTALLED_APPS += ["debug_toolbar"]
|
||||||
|
MIDDLEWARE = NonCIBase.MIDDLEWARE + [
|
||||||
|
"debug_toolbar.middleware.DebugToolbarMiddleware",
|
||||||
|
]
|
||||||
|
|
||||||
EMAIL = values.EmailURLValue("smtp://localhost:1025") # for local `mailpit`
|
EMAIL = values.EmailURLValue("smtp://localhost:1025") # for local `mailpit`
|
||||||
|
|
||||||
SENDFILE_BACKEND = "django_sendfile.backends.development"
|
SENDFILE_BACKEND = "django_sendfile.backends.development"
|
||||||
|
Loading…
Reference in New Issue
Block a user