mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user