From ba40cdce1451ef335d54cc8cf04b1c98a7fce170 Mon Sep 17 00:00:00 2001 From: Mjumbe Wawatu Poe Date: Thu, 15 Mar 2012 17:57:41 -0400 Subject: In the tests, pass a Context instead of a dict to the template to render --- src/shorturls/tests/test_templatetag.py | 4 ++-- 1 file 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)) -- cgit v1.2.3