diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2007-11-30 23:48:35 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2007-11-30 23:48:35 +0000 |
| commit | d0c49bfc60ce1f33f1bb1908482a0ee4e99d6525 (patch) | |
| tree | 8a841ed15ae5b28854a0840e46ee0a60e1883978 /tests/regressiontests/templates | |
| parent | fcb30a11d8c289632c271d1c4b9993d7ee4c2b9b (diff) | |
newforms-admin: Merged from trunk up to [6782].
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/templates')
| -rw-r--r-- | tests/regressiontests/templates/unicode.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/regressiontests/templates/unicode.py b/tests/regressiontests/templates/unicode.py index efda11c2da..e5f308d202 100644 --- a/tests/regressiontests/templates/unicode.py +++ b/tests/regressiontests/templates/unicode.py @@ -3,6 +3,7 @@ unicode_tests = ur""" Templates can be created from unicode strings. >>> from django.template import * +>>> from django.utils.safestring import SafeData >>> t1 = Template(u'ŠĐĆŽćžšđ {{ var }}') Templates can also be created from bytestrings. These are assumed by encoded @@ -24,10 +25,13 @@ 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 unicode objects). +render the same (and are returned as unicode objects and "safe" objects as +well, for auto-escaping purposes). >>> t1.render(c3) == t2.render(c3) True ->>> type(t1.render(c3)) -<type 'unicode'> +>>> isinstance(t1.render(c3), unicode) +True +>>> isinstance(t1.render(c3), SafeData) +True """ |
