summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_html.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils_tests/test_html.py')
-rw-r--r--tests/utils_tests/test_html.py6
1 files changed, 6 insertions, 0 deletions
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'}),
+ '<script type="application/json">{"key": "value"}</script>',
+ )
+
def test_smart_urlquote(self):
items = (
('http://öäü.com/', 'http://xn--4ca9at.com/'),