MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / test_binary_content

Function test_binary_content

test/mitmproxy/addons/test_savehar.py:147–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

145
146
147def test_binary_content():
148 resp_content = SaveHar().make_har(
149 [tflow.tflow(resp=tutils.tresp(content=b"foo" + b"\xff" * 10))]
150 )["log"]["entries"][0]["response"]["content"]
151 assert resp_content == {
152 "compression": 0,
153 "encoding": "base64",
154 "mimeType": "",
155 "size": 13,
156 "text": "Zm9v/////////////w==",
157 }
158
159
160@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

SaveHarClass · 0.90
make_harMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…