MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_basic

Method test_basic

test/mitmproxy/test_connection.py:38–50  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36
37class 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()

Callers

nothing calls this directly

Calls 1

ClientClass · 0.90

Tested by

no test coverage detected