MCPcopy
hub / github.com/django/django / test_format_html

Method test_format_html

tests/utils_tests/test_html.py:63–73  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

61 self.check_output(escape, "<&", "&lt;&amp;")
62
63 def test_format_html(self):
64 self.assertEqual(
65 format_html(
66 "{} {} {third} {fourth}",
67 "< Dangerous >",
68 mark_safe("<b>safe</b>"),
69 third="< dangerous again",
70 fourth=mark_safe("<i>safe again</i>"),
71 ),
72 "&lt; Dangerous &gt; <b>safe</b> &lt; dangerous again <i>safe again</i>",
73 )
74
75 def test_format_html_no_params(self):
76 msg = "args or kwargs must be provided."

Callers

nothing calls this directly

Calls 2

format_htmlFunction · 0.90
mark_safeFunction · 0.90

Tested by

no test coverage detected