aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin2013-12-15 13:06:16 +0100
committerAymeric Augustin2013-12-15 13:06:16 +0100
commit5360a2ba9c5b866ce2502aa43606b2647acea63b (patch)
treea329bde5cc206f57ac142cef8adba456b5e4b709 /tests
parentdbed3e7c72f930c285f17206879f6bd1d46f67a1 (diff)
downloaddjango-debug-toolbar-5360a2ba9c5b866ce2502aa43606b2647acea63b.tar.bz2
Properly disable instrumentation for the template panel.
It's important to disconnect the signal at the end of a request because the toolbar now stores panels for past request. Fix #491 (presumably).
Diffstat (limited to 'tests')
-rw-r--r--tests/panels/test_template.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/panels/test_template.py b/tests/panels/test_template.py
index 72e90c0..8a36f06 100644
--- a/tests/panels/test_template.py
+++ b/tests/panels/test_template.py
@@ -15,11 +15,13 @@ class TemplatesPanelTestCase(BaseTestCase):
def setUp(self):
super(TemplatesPanelTestCase, self).setUp()
self.panel = self.toolbar.get_panel_by_id('TemplatesPanel')
+ self.panel.enable_instrumentation()
self.sql_panel = self.toolbar.get_panel_by_id('SQLPanel')
self.sql_panel.enable_instrumentation()
def tearDown(self):
self.sql_panel.disable_instrumentation()
+ self.panel.disable_instrumentation()
super(TemplatesPanelTestCase, self).tearDown()
def test_queryset_hook(self):