summaryrefslogtreecommitdiff
path: root/tests/regressiontests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-06-17 10:25:48 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-06-17 10:25:48 +0000
commit2126d41aba06b50a288cc6a516d4531ced998822 (patch)
tree2ed0e56153471e6076903c99fda834a5f78dd364 /tests/regressiontests
parent1bfcfe615c65565da5009a205aecff394217717c (diff)
unicode: Render templates as unicode objects and only convert them to
bytestrings as part of HttpRespnose and other output paths. git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
-rw-r--r--tests/regressiontests/forms/tests.py2
-rw-r--r--tests/regressiontests/templates/tests.py2
-rw-r--r--tests/regressiontests/templates/unicode.py4
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/regressiontests/forms/tests.py b/tests/regressiontests/forms/tests.py
index 4844267b43..a2e23b8b42 100644
--- a/tests/regressiontests/forms/tests.py
+++ b/tests/regressiontests/forms/tests.py
@@ -3358,7 +3358,7 @@ does not have help text, nothing will be output.
<input type="submit" />
</form>
>>> Template('{{ form.password1.help_text }}').render(Context({'form': UserRegistration(auto_id=False)}))
-''
+u''
The label_tag() method takes an optional attrs argument: a dictionary of HTML
attributes to add to the <label> tag.
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index 349daaf337..b6615e1aa9 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -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': UTF8Class()}, '\xc5\xa0\xc4\x90\xc4\x86\xc5\xbd\xc4\x87\xc5\xbe\xc5\xa1\xc4\x91'),
+ 'filter-syntax18': (r'{{ var }}', {'var': UTF8Class()}, u'\u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111'),
### COMMENT SYNTAX ########################################################
'comment-syntax01': ("{# this is hidden #}hello", {}, "hello"),
diff --git a/tests/regressiontests/templates/unicode.py b/tests/regressiontests/templates/unicode.py
index 2f07c87c19..efda11c2da 100644
--- a/tests/regressiontests/templates/unicode.py
+++ b/tests/regressiontests/templates/unicode.py
@@ -24,10 +24,10 @@ Contexts can be constructed from unicode or UTF-8 bytestrings.
>>> c4 = Context({u'var': '\xc4\x90\xc4\x91'})
Since both templates and all four contexts represent the same thing, they all
-render the same (and are returned as bytestrings).
+render the same (and are returned as unicode objects).
>>> t1.render(c3) == t2.render(c3)
True
>>> type(t1.render(c3))
-<type 'str'>
+<type 'unicode'>
"""