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

Method test_order

test/mitmproxy/addons/test_modifybody.py:64–79  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

62 assert (f.response.content == b"bar") ^ take
63
64 def test_order(self):
65 mb = modifybody.ModifyBody()
66 with taddons.context(mb) as tctx:
67 tctx.configure(
68 mb,
69 modify_body=[
70 "/foo/bar",
71 "/bar/baz",
72 "/foo/oh noes!",
73 "/bar/oh noes!",
74 ],
75 )
76 f = tflow.tflow()
77 f.request.content = b"foo"
78 mb.request(f)
79 assert f.request.content == b"baz"
80
81 def test_backslash_in_replacement(self):
82 mb = modifybody.ModifyBody()

Callers

nothing calls this directly

Calls 3

requestMethod · 0.95
contextMethod · 0.80
configureMethod · 0.45

Tested by

no test coverage detected