def test_address(self): s = Server(("address", 22)) s.address = ("example.com", 443) s.state = ConnectionState.OPEN with pytest.raises(RuntimeError): s.address = ("example.com", 80) # No-op assignment, allowed because it might be triggered by a Server.set_state() call. s.address = ("example.com", 443)
def test_address(self): s = Server(("address", 22)) s.address = ("example.com", 443) s.state = ConnectionState.OPEN with pytest.raises(RuntimeError): s.address = ("example.com", 80)