aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMjumbe Wawatu Poe2012-03-15 17:57:41 -0400
committerMjumbe Wawatu Poe2012-03-15 17:57:57 -0400
commitba40cdce1451ef335d54cc8cf04b1c98a7fce170 (patch)
tree390137678c0af543bd7688735bc2b38ace91a7b6
parent5c99e5f8cc9c0618ede852cc190948e2852cea14 (diff)
downloaddjango-shorturls-ba40cdce1451ef335d54cc8cf04b1c98a7fce170.tar.bz2
In the tests, pass a Context instead of a dict to the template to render
-rw-r--r--src/shorturls/tests/test_templatetag.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shorturls/tests/test_templatetag.py b/src/shorturls/tests/test_templatetag.py
index daa5143..2127817 100644
--- a/src/shorturls/tests/test_templatetag.py
+++ b/src/shorturls/tests/test_templatetag.py
@@ -1,4 +1,4 @@
-from django import template
+from django.template import Template, Context
from django.conf import settings
from django.test import TestCase
from shorturls.tests.models import Animal, Vegetable, Mineral
@@ -23,7 +23,7 @@ class RedirectViewTestCase(TestCase):
settings.SHORT_BASE_URL = self.old_base
def render(self, t, **c):
- return template.Template('{% load shorturl %}'+t).render(c)
+ return Template('{% load shorturl %}'+t).render(Context(c))
def test_shorturl(self):
r = self.render('{% shorturl a %}', a=Animal.objects.get(id=12345))