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

Method test_func_references

test/mitmproxy/proxy/test_layer.py:155–171  ·  view source on GitHub ↗
(self, tctx: Context)

Source from the content-addressed store, hash-verified

153 )
154
155 def test_func_references(self, tctx: Context):
156 nl = layer.NextLayer(tctx)
157 playbook = tutils.Playbook(nl)
158
159 assert (
160 playbook
161 >> events.DataReceived(tctx.client, b"foo")
162 << layer.NextLayerHook(nl)
163 )
164 nl.layer = tutils.EchoLayer(tctx)
165 handle = nl.handle_event
166
167 playbook >> tutils.reply()
168 playbook << commands.SendData(tctx.client, b"foo")
169 assert playbook
170 (sd,) = handle(events.DataReceived(tctx.client, b"bar"))
171 assert isinstance(sd, commands.SendData)
172
173 def test_repr(self, tctx: Context):
174 nl = layer.NextLayer(tctx)

Callers

nothing calls this directly

Calls 1

handleFunction · 0.85

Tested by

no test coverage detected