From d5280e72d39638bb43d7c94b8bd097408d19f8f5 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Fri, 25 May 2007 10:36:14 +0000 Subject: [PATCH] unicode: Fixed a dubious test construct. git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5343 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/templates/tests.py | 8 ++++---- 1 file 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"),