aboutsummaryrefslogtreecommitdiffstats
path: root/tests/__init__.py
diff options
context:
space:
mode:
authorAymeric Augustin2013-11-01 18:24:54 +0100
committerAymeric Augustin2013-11-01 18:24:54 +0100
commit50b13fb575dc79d849d1d79cb5619cce52b42f9d (patch)
treef0bdd6f251131822c9db815b0ef12b9edb31cd84 /tests/__init__.py
parent3003c95626617c5c5331ddf10373e867b6610a63 (diff)
downloaddjango-debug-toolbar-50b13fb575dc79d849d1d79cb5619cce52b42f9d.tar.bz2
Get rid of custom test runner.
Refs #426.
Diffstat (limited to 'tests/__init__.py')
-rw-r--r--tests/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/__init__.py b/tests/__init__.py
index e69de29..3b83e4c 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -0,0 +1,12 @@
+# 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_toolbar_config(**kwargs):
+ if kwargs['setting'] == 'DEBUG_TOOLBAR_CONFIG':
+ CONFIG.update(CONFIG_DEFAULTS)
+ CONFIG.update(kwargs['value'] or {})