MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_wbxml

Function test_wbxml

test/mitmproxy/contentviews/test__view_wbxml.py:9–21  ·  view source on GitHub ↗
(tdata)

Source from the content-addressed store, hash-verified

7
8
9def test_wbxml(tdata):
10 assert wbxml.prettify(b"\x03\x01\x6a\x00", Metadata()) == '<?xml version="1.0" ?>\n'
11 with pytest.raises(Exception):
12 wbxml.prettify(b"foo", Metadata())
13
14 # File taken from https://github.com/davidpshaw/PyWBXMLDecoder/tree/master/wbxml_samples
15 path = tdata.path(datadir + "data.wbxml")
16 with open(path, "rb") as f:
17 input = f.read()
18 with open("-formatted.".join(path.rsplit(".", 1))) as f:
19 expected = f.read()
20
21 assert wbxml.prettify(input, Metadata()) == expected
22
23
24def test_render_priority():

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…