MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / test_simple

Method test_simple

test/mitmproxy/addons/test_savehar.py:189–205  ·  view source on GitHub ↗
(self, capsys)

Source from the content-addressed store, hash-verified

187
188class TestHardumpOption:
189 def test_simple(self, capsys):
190 s = SaveHar()
191 with taddons.context(s) as tctx:
192 tctx.configure(s, hardump="-")
193
194 s.response(tflow.tflow())
195
196 s.error(tflow.tflow())
197
198 ws = tflow.twebsocketflow()
199 s.response(ws)
200 s.websocket_end(ws)
201
202 s.done()
203
204 out = json.loads(capsys.readouterr().out)
205 assert len(out["log"]["entries"]) == 3
206
207 def test_filter(self, capsys):
208 s = SaveHar()

Callers

nothing calls this directly

Calls 8

responseMethod · 0.95
errorMethod · 0.95
websocket_endMethod · 0.95
doneMethod · 0.95
SaveHarClass · 0.90
contextMethod · 0.80
loadsMethod · 0.80
configureMethod · 0.45

Tested by

no test coverage detected