mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #33302 -- Made element_id optional argument for json_script template filter.
Added versionchanged note in documentation
This commit is contained in:
committed by
Mariusz Felisiak
parent
dd528cb2ce
commit
e6e664a711
@@ -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'}),
|
||||
'<script type="application/json">{"key": "value"}</script>',
|
||||
)
|
||||
|
||||
def test_smart_urlquote(self):
|
||||
items = (
|
||||
('http://öäü.com/', 'http://xn--4ca9at.com/'),
|
||||
|
||||
Reference in New Issue
Block a user