From f4699b2333aa42024fce0f75c33cec7412747faf Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Mon, 14 Oct 2013 23:20:24 +0200 Subject: Fix a failing test on Django 1.5. It was failing since I added a default context with a few constants. --- tests/tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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('<>', ctx) self.assertIn('<>', ctx) -- cgit v1.2.3