MCPcopy
hub / github.com/django/django / test_normalize_refs

Method test_normalize_refs

tests/test_utils/tests.py:836–859  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

834 self.assertEqual(str(parse_html(html2)), '<input value="">')
835
836 def test_normalize_refs(self):
837 pairs = [
838 ("&#39;", "&#x27;"),
839 ("&#39;", "'"),
840 ("&#x27;", "&#39;"),
841 ("&#x27;", "'"),
842 ("'", "&#39;"),
843 ("'", "&#x27;"),
844 ("&amp;", "&#38;"),
845 ("&amp;", "&#x26;"),
846 ("&amp;", "&"),
847 ("&#38;", "&amp;"),
848 ("&#38;", "&#x26;"),
849 ("&#38;", "&"),
850 ("&#x26;", "&amp;"),
851 ("&#x26;", "&#38;"),
852 ("&#x26;", "&"),
853 ("&", "&amp;"),
854 ("&", "&#38;"),
855 ("&", "&#x26;"),
856 ]
857 for pair in pairs:
858 with self.subTest(repr(pair)):
859 self.assertHTMLEqual(*pair)
860
861 def test_complex_examples(self):
862 self.assertHTMLEqual(

Callers

nothing calls this directly

Calls 1

assertHTMLEqualMethod · 0.80

Tested by

no test coverage detected