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

Method test_normal

test/mitmproxy/addons/test_readfile.py:111–121  ·  view source on GitHub ↗
(self, tmpdir, data)

Source from the content-addressed store, hash-verified

109 await rf.load_flows(stdin.buffer)
110
111 async def test_normal(self, tmpdir, data):
112 rf = readfile.ReadFileStdin()
113 with taddons.context(rf) as tctx:
114 tf = tmpdir.join("tfile")
115 with mock.patch("mitmproxy.master.Master.load_flow") as mck:
116 tf.write(data.getvalue())
117 tctx.configure(rf, rfile=str(tf))
118 mck.assert_not_awaited()
119 rf.running()
120 await asyncio.sleep(0)
121 mck.assert_awaited()

Callers

nothing calls this directly

Calls 6

contextMethod · 0.80
getvalueMethod · 0.80
joinMethod · 0.45
writeMethod · 0.45
configureMethod · 0.45
runningMethod · 0.45

Tested by

no test coverage detected