Exemplo n.º 1
0
 def test_basic(self):
     c = Client(("127.0.0.1", 52314), ("127.0.0.1", 8080), 1607780791)
     assert not c.tls_established
     c.timestamp_tls_setup = 1607780792
     assert c.tls_established
     assert c.connected
     c.state = ConnectionState.CAN_WRITE
     assert not c.connected
Exemplo n.º 2
0
 def test_basic(self):
     c = Client(("127.0.0.1", 52314), ("127.0.0.1", 8080), 1607780791)
     assert repr(c)
     assert str(c)
     c.timestamp_tls_setup = 1607780791
     assert str(c)
     c.alpn = b"foo"
     assert str(c) == "Client(127.0.0.1:52314, state=open, alpn=foo)"