summaryrefslogtreecommitdiff
path: root/tests/i18n
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2022-05-28 11:52:06 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-05-31 06:09:39 +0200
commit292f372768836e2aebc713064c5139e8067eebcb (patch)
tree2f95fd95d27e18bc35f2d9378172cca97ee1935c /tests/i18n
parent8c0886b068ba4e224dd78104b93c9638b860b398 (diff)
Fixed #33748 -- Fixed date template filter crash with lazy format.
Regression in 659d2421c7adbbcd205604002d521d82d6b0b465.
Diffstat (limited to 'tests/i18n')
-rw-r--r--tests/i18n/tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py
index 0093181f64..d79cdcd34d 100644
--- a/tests/i18n/tests.py
+++ b/tests/i18n/tests.py
@@ -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.