Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[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
  • Loading branch information...
commit cbe27e3cc4478431bb90dd22ecf81d0948dc7b7a 1 parent 488c9b3
@freakboy3742 freakboy3742 authored
View
3  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):
View
3  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):
View
3  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):
View
7 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 @@ def test_template(self):
# 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))
Please sign in to comment.
Something went wrong with that request. Please try again.