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

Method test_simple

test/mitmproxy/addons/test_mapremote.py:16–28  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

14 tctx.configure(mr, map_remote=["/foo/+/three"])
15
16 def test_simple(self):
17 mr = mapremote.MapRemote()
18 with taddons.context(mr) as tctx:
19 tctx.configure(
20 mr,
21 map_remote=[
22 ":example.org/images/:mitmproxy.org/img/",
23 ],
24 )
25 f = tflow.tflow()
26 f.request.url = b"https://example.org/images/test.jpg"
27 mr.request(f)
28 assert f.request.url == "https://mitmproxy.org/img/test.jpg"
29
30 def test_host_header(self):
31 mr = mapremote.MapRemote()

Callers

nothing calls this directly

Calls 3

requestMethod · 0.95
contextMethod · 0.80
configureMethod · 0.45

Tested by

no test coverage detected