From e6e664a71130ee74d2c4c6800e4131f132709997 Mon Sep 17 00:00:00 2001 From: Baptiste Mispelon Date: Fri, 19 Nov 2021 16:52:57 +0100 Subject: Fixed #33302 -- Made element_id optional argument for json_script template filter. Added versionchanged note in documentation --- tests/utils_tests/test_html.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/utils_tests/test_html.py') diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py index 909620ea3f..63644daf61 100644 --- a/tests/utils_tests/test_html.py +++ b/tests/utils_tests/test_html.py @@ -173,6 +173,12 @@ class TestUtilsHtml(SimpleTestCase): with self.subTest(arg=arg): self.assertEqual(json_script(arg, 'test_id'), expected) + def test_json_script_without_id(self): + self.assertHTMLEqual( + json_script({'key': 'value'}), + '', + ) + def test_smart_urlquote(self): items = ( ('http://öäü.com/', 'http://xn--4ca9at.com/'), -- cgit v1.3