TWLight.settings: allow tests to pass with DjDT
@@ -190,7 +190,11 @@ DEBUG = bool(os.environ.get("DEBUG", "False").lower() == "true")
# we can enable it by setting REQUIREMENTS_FILE variable to "debug.txt" in the
# docker build arg and the environment of the running container
REQUIREMENTS_FILE = os.environ.get("REQUIREMENTS_FILE", "wmf.txt")
-if TWLIGHT_ENV == "local" and REQUIREMENTS_FILE == "debug.txt" and DEBUG:
+if (
+ TWLIGHT_ENV == "local"
+ and REQUIREMENTS_FILE == "debug.txt"
+ and (DEBUG or "test" in sys.argv)
+):
INSTALLED_APPS += [
"debug_toolbar",
]
