diff options
| author | Aymeric Augustin | 2013-10-14 23:20:24 +0200 | 
|---|---|---|
| committer | Aymeric Augustin | 2013-10-14 23:20:24 +0200 | 
| commit | f4699b2333aa42024fce0f75c33cec7412747faf (patch) | |
| tree | 71b70ee5cd8173c0b8a8235714c30e5dbd86a0da | |
| parent | 7e4ecfd04cfe61b51e1fd6fdf0ce1c800a3ebb3b (diff) | |
| download | django-debug-toolbar-f4699b2333aa42024fce0f75c33cec7412747faf.tar.bz2 | |
Fix a failing test on Django 1.5.
It was failing since I added a default context with a few constants.
| -rw-r--r-- | tests/tests.py | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/tests/tests.py b/tests/tests.py index f76f1ab..fcb6c1e 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -1,6 +1,7 @@  from __future__ import with_statement  import thread +import django  from django.conf import settings  from django.contrib.auth.models import User  from django.db import connection @@ -263,7 +264,8 @@ class TemplatePanelTestCase(BaseTestCase):          t.render(c)          # ensure the query was NOT logged          self.assertEquals(len(sql_panel._queries), 0) -        ctx = template_panel.templates[0]['context'][0] +        base_ctx_idx = 1 if django.VERSION[:2] >= (1, 5) else 0 +        ctx = template_panel.templates[0]['context'][base_ctx_idx]          self.assertIn('<<queryset of auth.User>>', ctx)          self.assertIn('<<triggers database query>>', ctx) | 
