1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #33748 -- Fixed date template filter crash with lazy format.

Regression in 659d2421c7.
This commit is contained in:
Claude Paroz
2022-05-28 11:52:06 +02:00
committed by Mariusz Felisiak
parent 8c0886b068
commit 292f372768
3 changed files with 9 additions and 0 deletions

View File

@@ -1518,6 +1518,9 @@ class FormattingTests(SimpleTestCase):
with translation.override("de", deactivate=True):
self.assertEqual(".", get_format("DECIMAL_SEPARATOR", lang="en"))
def test_get_format_lazy_format(self):
self.assertEqual(get_format(gettext_lazy("DATE_FORMAT")), "N j, Y")
def test_localize_templatetag_and_filter(self):
"""
Test the {% localize %} templatetag and the localize/unlocalize filters.