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

Method test_address

test/mitmproxy/test_connection.py:87–94  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

85 assert c2.get_state() == c.get_state()
86
87 def test_address(self):
88 s = Server(address=("address", 22))
89 s.address = ("example.com", 443)
90 s.state = ConnectionState.OPEN
91 with pytest.raises(RuntimeError):
92 s.address = ("example.com", 80)
93 # No-op assignment, allowed because it might be triggered by a Server.set_state() call.
94 s.address = ("example.com", 443)

Callers

nothing calls this directly

Calls 1

ServerClass · 0.90

Tested by

no test coverage detected