MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_is_killed

Method test_is_killed

test/mitmproxy/addons/test_maplocal.py:196–206  ·  view source on GitHub ↗
(self, tmpdir)

Source from the content-addressed store, hash-verified

194 assert "Could not read" in caplog.text
195
196 def test_is_killed(self, tmpdir):
197 ml = MapLocal()
198 with taddons.context(ml) as tctx:
199 tmpfile = tmpdir.join("foo.jpg")
200 tmpfile.write("foo")
201 tctx.configure(ml, map_local=["|//example.org/images|" + str(tmpfile)])
202 f = tflow.tflow()
203 f.request.url = b"https://example.org/images/foo.jpg"
204 f.kill()
205 ml.request(f)
206 assert not f.response

Callers

nothing calls this directly

Calls 7

requestMethod · 0.95
MapLocalClass · 0.90
contextMethod · 0.80
joinMethod · 0.45
writeMethod · 0.45
configureMethod · 0.45
killMethod · 0.45

Tested by

no test coverage detected