File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 6464 MIDDLEWARE .append (
6565 "django_browser_reload.middleware.BrowserReloadMiddleware"
6666 )
67- MIDDLEWARE .append ("debug_toolbar.middleware.DebugToolbarMiddleware" )
67+ if not TESTING :
68+ MIDDLEWARE .append ("debug_toolbar.middleware.DebugToolbarMiddleware" )
6869
6970ROOT_URLCONF = "bc.urls"
7071AUTH_USER_MODEL = "users.User"
Original file line number Diff line number Diff line change 55from ..django import DEVELOPMENT , INSTALLED_APPS , TESTING
66from ..third_party .aws import AWS_S3_CUSTOM_DOMAIN
77from ..third_party .sentry import SENTRY_REPORT_URI
8+ from ..project .testing import TESTING
89
910env = environ .FileAwareEnv ()
1011
8687 CSRF_COOKIE_SECURE = False
8788 SESSION_COOKIE_DOMAIN = None
8889 # For debug_toolbar
89- INSTALLED_APPS .append ("debug_toolbar" )
90+ if not TESTING :
91+ INSTALLED_APPS = [
92+ * INSTALLED_APPS ,
93+ "debug_toolbar" ,
94+ ]
9095
9196 # Get the list of IPv4 addresses for the interface on the same host. If you want to know more
9297 # about this, you can check the following links:
Original file line number Diff line number Diff line change 2323 urlpatterns .append (
2424 path ("__reload__/" , include ("django_browser_reload.urls" )),
2525 )
26- urlpatterns .append (
27- path ("__debug__/" , include ("debug_toolbar.urls" )),
28- )
26+ if not settings .TESTING :
27+ urlpatterns .append (
28+ path ("__debug__/" , include ("debug_toolbar.urls" )),
29+ )
2930 urlpatterns += static ( # type: ignore
3031 settings .STATIC_URL , document_root = settings .STATIC_ROOT
3132 )
You can’t perform that action at this time.
0 commit comments