summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-25 10:36:14 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-25 10:36:14 +0000
commitd5280e72d39638bb43d7c94b8bd097408d19f8f5 (patch)
tree0fe7debfe43cce22493a5ffc4ec670f3ef88daac
parent7ba850af3ba4ac7dbe3d67a2360079bce0bf0eb3 (diff)
unicode: Fixed a dubious test construct.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5343 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/regressiontests/templates/tests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index da1ad4f427..141e512409 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -69,10 +69,10 @@ class OtherClass:
def method(self):
return "OtherClass.method"
-class UnicodeInStrClass:
- "Class whose __str__ returns a Unicode object."
+class UTF8Class:
+ "Class whose __str__ returns non-ASCII data"
def __str__(self):
- return u'ŠĐĆŽćžšđ'
+ return u'ŠĐĆŽćžšđ'.encode('utf-8')
class Templates(unittest.TestCase):
def test_templates(self):
@@ -223,7 +223,7 @@ class Templates(unittest.TestCase):
# Make sure that any unicode strings are converted to bytestrings
# in the final output.
- 'filter-syntax18': (r'{{ var }}', {'var': UnicodeInStrClass()}, '\xc5\xa0\xc4\x90\xc4\x86\xc5\xbd\xc4\x87\xc5\xbe\xc5\xa1\xc4\x91'),
+ 'filter-syntax18': (r'{{ var }}', {'var': UTF8Class()}, '\xc5\xa0\xc4\x90\xc4\x86\xc5\xbd\xc4\x87\xc5\xbe\xc5\xa1\xc4\x91'),
### COMMENT SYNTAX ########################################################
'comment-syntax01': ("{# this is hidden #}hello", {}, "hello"),