def tclient_conn(): c = ClientConnection._from_state(dict( address=dict(address=("address", 22), use_ipv6=True), clientcert=None )) c.reply = controller.DummyReply() return c
def tclient_conn(): """ @return: libmproxy.proxy.connection.ClientConnection """ c = ClientConnection.from_state( dict(address=dict(address=("address", 22), use_ipv6=True), clientcert=None)) c.reply = controller.DummyReply() return c
def tclient_conn(): """ @return: libmproxy.proxy.connection.ClientConnection """ c = ClientConnection.from_state(dict( address=dict(address=("address", 22), use_ipv6=True), clientcert=None )) c.reply = controller.DummyReply() return c
def test_state(self): c = tutils.tclient_conn() assert ClientConnection._from_state(c._get_state()) == c c2 = tutils.tclient_conn() c2.address.address = (c2.address.host, 4242) assert not c == c2 c2.timestamp_start = 42 c._load_state(c2._get_state()) assert c.timestamp_start == 42 c3 = c.copy() assert c3 == c assert str(c)
def tclient_conn(): c = ClientConnection._from_state( dict(address=dict(address=("address", 22), use_ipv6=True), clientcert=None)) c.reply = controller.DummyReply() return c