summaryrefslogtreecommitdiff
path: root/tests/regressiontests
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-01-01 21:38:58 +0000
committerJannis Leidel <jannis@leidel.info>2010-01-01 21:38:58 +0000
commitac371ccac8dada9f97fd66fc9780c085e7f04470 (patch)
treeec8e7f83b0eb04a9b289a9821e13434f29143dce /tests/regressiontests
parent855e805b4cd1ce40751ef166d36cc6f0ae2a2519 (diff)
Fixed #12435 - Handle Unicode characters in format strings correctly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12057 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
-rw-r--r--tests/regressiontests/i18n/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/regressiontests/i18n/tests.py b/tests/regressiontests/i18n/tests.py
index 87351eb6b2..2df08a6648 100644
--- a/tests/regressiontests/i18n/tests.py
+++ b/tests/regressiontests/i18n/tests.py
@@ -1,3 +1,4 @@
+# -*- encoding: utf-8 -*-
import sys
import decimal
import datetime
@@ -138,6 +139,10 @@ class FormattingTests(TestCase):
self.assertEqual(u'-66666.6', format(-66666.666, decimal_sep='.', decimal_pos=1))
self.assertEqual(u'-66666.0', format(int('-66666'), decimal_sep='.', decimal_pos=1))
+ # date filter
+ self.assertEqual(u'31.12.2009 в 20:50', Template('{{ dt|date:"d.m.Y в H:i" }}').render(self.ctxt))
+ self.assertEqual(u'⌚ 10:15', Template('{{ t|time:"⌚ H:i" }}').render(self.ctxt))
+
def test_l10n_disabled(self):
"""
Catalan locale with format i18n disabled translations will be used,