diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-11-08 04:42:13 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-11-08 04:42:13 +0000 |
| commit | cbe27e3cc4478431bb90dd22ecf81d0948dc7b7a (patch) | |
| tree | ee45d0a5836940ed4783ee67f5356706057729a1 | |
| parent | 488c9b3f115b9deb5e4b0f4e62109da6aad02cfa (diff) | |
[1.2.X] Corrected some backporting errors in the template tests.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | tests/regressiontests/templates/context.py | 3 | ||||
| -rw-r--r-- | tests/regressiontests/templates/custom.py | 3 | ||||
| -rw-r--r-- | tests/regressiontests/templates/parser.py | 3 | ||||
| -rw-r--r-- | tests/regressiontests/templates/unicode.py | 7 |
4 files changed, 10 insertions, 6 deletions
diff --git a/tests/regressiontests/templates/context.py b/tests/regressiontests/templates/context.py index 05c1dd57b9..394de942c7 100644 --- a/tests/regressiontests/templates/context.py +++ b/tests/regressiontests/templates/context.py @@ -1,6 +1,7 @@ # coding: utf-8 +from unittest import TestCase + from django.template import Context -from django.utils.unittest import TestCase class ContextTests(TestCase): diff --git a/tests/regressiontests/templates/custom.py b/tests/regressiontests/templates/custom.py index bd1e441e7f..b346198874 100644 --- a/tests/regressiontests/templates/custom.py +++ b/tests/regressiontests/templates/custom.py @@ -1,5 +1,6 @@ +from unittest import TestCase + from django import template -from django.utils.unittest import TestCase class CustomTests(TestCase): diff --git a/tests/regressiontests/templates/parser.py b/tests/regressiontests/templates/parser.py index 1609c67e22..93e8118494 100644 --- a/tests/regressiontests/templates/parser.py +++ b/tests/regressiontests/templates/parser.py @@ -1,9 +1,10 @@ """ Testing some internals of the template processing. These are *not* examples to be copied in user code. """ +from unittest import TestCase + from django.template import (TokenParser, FilterExpression, Parser, Variable, TemplateSyntaxError) -from django.utils.unittest import TestCase class ParserTests(TestCase): diff --git a/tests/regressiontests/templates/unicode.py b/tests/regressiontests/templates/unicode.py index c8d7309ad7..05b0e22c2e 100644 --- a/tests/regressiontests/templates/unicode.py +++ b/tests/regressiontests/templates/unicode.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- +from unittest import TestCase + from django.template import Template, TemplateEncodingError, Context from django.utils.safestring import SafeData -from django.utils.unittest import TestCase class UnicodeTests(TestCase): @@ -25,5 +26,5 @@ class UnicodeTests(TestCase): # they all render the same (and are returned as unicode objects and # "safe" objects as well, for auto-escaping purposes). self.assertEqual(t1.render(c3), t2.render(c3)) - self.assertIsInstance(t1.render(c3), unicode) - self.assertIsInstance(t1.render(c3), SafeData) + self.assertTrue(isinstance(t1.render(c3), unicode)) + self.assertTrue(isinstance(t1.render(c3), SafeData)) |
