summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-22 08:06:57 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-22 08:06:57 +0000
commitdd52eed2fb8dd93f08f12731330fa30126f800da (patch)
tree81cebcc8bfae2a4569d386190cba1aff99cddb21 /tests
parentc2c585f0f0785b71d2efbe6de8b95ff994e59601 (diff)
unicode: Made lazy translation objects work properly. Fixed #4295, #4320.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/forms/regressions.py14
-rw-r--r--tests/regressiontests/humanize/tests.py10
2 files changed, 12 insertions, 12 deletions
diff --git a/tests/regressiontests/forms/regressions.py b/tests/regressiontests/forms/regressions.py
index c160ccbd01..723cad53cd 100644
--- a/tests/regressiontests/forms/regressions.py
+++ b/tests/regressiontests/forms/regressions.py
@@ -27,13 +27,13 @@ Translations are done at rendering time, so multi-lingual apps can define forms
early and still send back the right translation.
# XFAIL
-# >>> activate('de')
-# >>> print f.as_p()
-# <p><label for="id_username">Benutzername:</label> <input id="id_username" type="text" name="username" maxlength="10" /></p>
-# >>> activate('pl')
-# >>> f.as_p()
-# u'<p><label for="id_username">Nazwa u\u017cytkownika:</label> <input id="id_username" type="text" name="username" maxlength="10" /></p>'
-# >>> deactivate()
+>>> activate('de')
+>>> print f.as_p()
+<p><label for="id_username">Benutzername:</label> <input id="id_username" type="text" name="username" maxlength="10" /></p>
+>>> activate('pl')
+>>> f.as_p()
+u'<p><label for="id_username">Nazwa u\u017cytkownika:</label> <input id="id_username" type="text" name="username" maxlength="10" /></p>'
+>>> deactivate()
Unicode decoding problems...
>>> GENDERS = ((u'\xc5', u'En tied\xe4'), (u'\xf8', u'Mies'), (u'\xdf', u'Nainen'))
diff --git a/tests/regressiontests/humanize/tests.py b/tests/regressiontests/humanize/tests.py
index eca65f7575..f94d642973 100644
--- a/tests/regressiontests/humanize/tests.py
+++ b/tests/regressiontests/humanize/tests.py
@@ -15,7 +15,7 @@ class HumanizeTests(unittest.TestCase):
self.assertEqual(rendered, result_list[index],
msg="""%s test failed, produced %s,
should've produced %s""" % (method, rendered, result_list[index]))
-
+
def test_ordinal(self):
test_list = ('1','2','3','4','11','12',
'13','101','102','103','111',
@@ -43,12 +43,12 @@ should've produced %s""" % (method, rendered, result_list[index]))
self.humanize_tester(test_list, result_list, 'intword')
def test_apnumber(self):
- test_list = [str(x) for x in xrange(1,11)]
- result_list = ('one', 'two', 'three', 'four', 'five', 'six',
- 'seven', 'eight', 'nine', '10')
+ test_list = [str(x) for x in range(1, 11)]
+ result_list = (u'one', u'two', u'three', u'four', u'five', u'six',
+ u'seven', u'eight', u'nine', u'10')
self.humanize_tester(test_list, result_list, 'apnumber')
if __name__ == '__main__':
unittest.main()
-
+