def test_state(self): c = tutils.tclient_conn() assert ClientConnection.from_state(c.get_state()).get_state() == \ c.get_state() c2 = tutils.tclient_conn() c2.address.address = (c2.address.host, 4242) assert not c == c2 c2.timestamp_start = 42 c.set_state(c2.get_state()) assert c.timestamp_start == 42 c3 = c.copy() assert c3.get_state() == c.get_state() assert str(c)