diff options
| author | Aymeric Augustin | 2013-11-01 18:24:54 +0100 |
|---|---|---|
| committer | Aymeric Augustin | 2013-11-01 18:24:54 +0100 |
| commit | 50b13fb575dc79d849d1d79cb5619cce52b42f9d (patch) | |
| tree | f0bdd6f251131822c9db815b0ef12b9edb31cd84 /tests/__init__.py | |
| parent | 3003c95626617c5c5331ddf10373e867b6610a63 (diff) | |
| download | django-debug-toolbar-50b13fb575dc79d849d1d79cb5619cce52b42f9d.tar.bz2 | |
Get rid of custom test runner.
Refs #426.
Diffstat (limited to 'tests/__init__.py')
| -rw-r--r-- | tests/__init__.py | 12 |
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 {}) |
