aboutsummaryrefslogtreecommitdiffstats
path: root/runtests.py
diff options
context:
space:
mode:
Diffstat (limited to 'runtests.py')
-rw-r--r--runtests.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/runtests.py b/runtests.py
index 544222c..bed16aa 100644
--- a/runtests.py
+++ b/runtests.py
@@ -34,6 +34,20 @@ if not settings.configured and not os.environ.get('DJANGO_SETTINGS_MODULE'):
SITE_ID=1,
)
+
+# Refresh the debug toolbar's configuration when overriding settings.
+from debug_toolbar.utils.settings import CONFIG, CONFIG_DEFAULTS
+from django.dispatch import receiver
+from django.test.signals import setting_changed
+
+
+@receiver(setting_changed)
+def update_connections_time_zone(**kwargs):
+ if kwargs['setting'] == 'DEBUG_TOOLBAR_CONFIG':
+ CONFIG.update(CONFIG_DEFAULTS)
+ CONFIG.update(kwargs['value'] or {})
+
+
from django.test.simple import DjangoTestSuiteRunner