MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_format_xml

Function test_format_xml

test/mitmproxy/contentviews/test__view_xml_html.py:37–44  ·  view source on GitHub ↗
(filename, tdata)

Source from the content-addressed store, hash-verified

35 "filename", ["simple.html", "cdata.xml", "comment.xml", "inline.html", "test.html"]
36)
37def test_format_xml(filename, tdata):
38 path = tdata.path(datadir + filename)
39 with open(path, "rb") as f:
40 input = f.read()
41 with open("-formatted.".join(path.rsplit(".", 1))) as f:
42 expected = f.read()
43
44 assert xml_html.prettify(input, Metadata()) == expected
45
46
47def test_render_priority():

Callers

nothing calls this directly

Calls 5

MetadataClass · 0.90
pathMethod · 0.45
readMethod · 0.45
joinMethod · 0.45
prettifyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…