MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_invalid_protocol

Function test_invalid_protocol

test/mitmproxy/proxy/test_mode_servers.py:315–322  ·  view source on GitHub ↗
(monkeypatch)

Source from the content-addressed store, hash-verified

313
314
315async def test_invalid_protocol(monkeypatch):
316 manager = MagicMock()
317
318 with taddons.context():
319 inst = ServerInstance.make(f"regular@127.0.0.1:0", manager)
320 monkeypatch.setattr(inst.mode, "transport_protocol", "invalid_proto")
321 with pytest.raises(AssertionError, match=f"invalid_proto"):
322 await inst.start()
323
324
325async def test_udp_start_stop(caplog_async):

Callers

nothing calls this directly

Calls 3

contextMethod · 0.80
makeMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…