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

Method handle_event

test/mitmproxy/proxy/test_server.py:78–84  ·  view source on GitHub ↗
(self, event: Event)

Source from the content-addressed store, hash-verified

76async def test_no_reentrancy(capsys):
77 class ReentrancyTestLayer(layer.Layer):
78 def handle_event(self, event: Event) -> layer.CommandGenerator[None]:
79 if isinstance(event, Start):
80 print("Starting...")
81 yield FastHook()
82 print("Start completed.")
83 elif isinstance(event, HookCompleted):
84 print(f"Hook completed (must not happen before start is completed).")
85
86 def _handle_event(self, event: Event) -> layer.CommandGenerator[None]:
87 raise NotImplementedError

Callers 10

__bool__Method · 0.45
test_socks5_fuzzFunction · 0.45
test_fuzz_h1_requestFunction · 0.45
test_fuzz_h1_responseFunction · 0.45
h2_layerFunction · 0.45
_h2_requestFunction · 0.45
_h2_responseFunction · 0.45
_handle_eventMethod · 0.45
quic_event_receivedMethod · 0.45
quic_event_receivedMethod · 0.45

Calls 1

FastHookClass · 0.85

Tested by

no test coverage detected