MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_add_header

Method test_add_header

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

Source from the content-addressed store, hash-verified

7
8class TestScripts:
9 def test_add_header(self, tdata):
10 with taddons.context() as tctx:
11 a = tctx.script(tdata.path("../examples/addons/anatomy2.py"))
12 f = tflow.tflow()
13 a.request(f)
14 assert f.request.headers["myheader"] == "value"
15
16 def test_custom_contentviews(self, tdata):
17 with taddons.context() as tctx:

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