1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
From: Carsten Schoenert <c.schoenert@t-online.de>
Date: Fri, 31 May 2024 20:31:09 +0200
Subject: tests: Ignore error about using DDT
We need now to explicetly tell the test setup that we want to use the
Django Debug Toolbar. It's the sense of the testings. Otherwise the
following error will thrown.
SystemCheckError: System check identified some issues:
ERRORS:
?: (debug_toolbar.E001) The Django Debug Toolbar can't be used with tests
HINT: Django changes the DEBUG setting to False when running tests. By default the Django Debug Toolbar is installed because DEBUG is set to True. For most cases, you need to avoid installing the toolbar when running tests. If you feel this check is in error, you can set `DEBUG_TOOLBAR_CONFIG['IS_RUNNING_TESTS'] = False` to bypass this check.
---
tests/settings.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/settings.py b/tests/settings.py
index 0b23db5..0789f43 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -27,3 +27,5 @@ DEBUG_TOOLBAR_CONFIG = {
"RENDER_PANELS": False,
"DISABLE_PANELS": [],
}
+
+DEBUG_TOOLBAR_CONFIG['IS_RUNNING_TESTS'] = False
|