diff options
author | Claude Paroz <claude@2xlibre.net> | 2022-05-28 11:52:06 +0200 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-05-31 06:09:39 +0200 |
commit | 292f372768836e2aebc713064c5139e8067eebcb (patch) | |
tree | 2f95fd95d27e18bc35f2d9378172cca97ee1935c /tests/template_tests | |
parent | 8c0886b068ba4e224dd78104b93c9638b860b398 (diff) | |
download | django-292f372768836e2aebc713064c5139e8067eebcb.tar.gz |
Fixed #33748 -- Fixed date template filter crash with lazy format.
Regression in 659d2421c7adbbcd205604002d521d82d6b0b465.
Diffstat (limited to 'tests/template_tests')
-rw-r--r-- | tests/template_tests/filter_tests/test_date.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/template_tests/filter_tests/test_date.py b/tests/template_tests/filter_tests/test_date.py index a7c694d50e..b998f83ba6 100644 --- a/tests/template_tests/filter_tests/test_date.py +++ b/tests/template_tests/filter_tests/test_date.py @@ -72,6 +72,11 @@ class DateTests(TimezoneTestCase): output = self.engine.render_to_string("date09", {"t": time(0, 0)}) self.assertEqual(output, "00:00") + @setup({"datelazy": '{{ t|date:_("H:i") }}'}) + def test_date_lazy(self): + output = self.engine.render_to_string("datelazy", {"t": time(0, 0)}) + self.assertEqual(output, "00:00") + class FunctionTests(SimpleTestCase): def test_date(self): |