MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_send_reply_from_proxy

Method test_send_reply_from_proxy

test/examples/test_examples.py:58–63  ·  view source on GitHub ↗
(self, tdata)

Source from the content-addressed store, hash-verified

56 assert f.request.host == "mitmproxy.org"
57
58 def test_send_reply_from_proxy(self, tdata):
59 with taddons.context() as tctx:
60 sc = tctx.script(tdata.path("../examples/addons/http-reply-from-proxy.py"))
61 f = tflow.tflow(req=tutils.treq(host="example.com", port=80))
62 sc.request(f)
63 assert f.response.content == b"Hello World"

Callers

nothing calls this directly

Calls 4

contextMethod · 0.80
scriptMethod · 0.80
pathMethod · 0.45
requestMethod · 0.45

Tested by

no test coverage detected