(self)
| 36 | |
| 37 | class TestClient: |
| 38 | def test_basic(self): |
| 39 | c = Client( |
| 40 | peername=("127.0.0.1", 52314), |
| 41 | sockname=("127.0.0.1", 8080), |
| 42 | timestamp_start=1607780791, |
| 43 | cipher_list=["foo", "bar"], |
| 44 | ) |
| 45 | assert repr(c) |
| 46 | assert str(c) |
| 47 | c.timestamp_tls_setup = 1607780791 |
| 48 | assert str(c) |
| 49 | c.alpn = b"foo" |
| 50 | assert str(c) == "Client(127.0.0.1:52314, state=closed, alpn=foo)" |
| 51 | |
| 52 | def test_state(self): |
| 53 | c = tclient_conn() |