MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / test_open_connection

Function test_open_connection

test/mitmproxy/proxy/layers/test_udp.py:17–25  ·  view source on GitHub ↗

If there is no server connection yet, establish one, because the server may send data first.

(tctx)

Source from the content-addressed store, hash-verified

15
16
17def test_open_connection(tctx):
18 """
19 If there is no server connection yet, establish one,
20 because the server may send data first.
21 """
22 assert Playbook(udp.UDPLayer(tctx, True)) << OpenConnection(tctx.server)
23
24 tctx.server.timestamp_start = 1624544785
25 assert Playbook(udp.UDPLayer(tctx, True)) << None
26
27
28def test_open_connection_err(tctx):

Callers

nothing calls this directly

Calls 2

OpenConnectionClass · 0.90
PlaybookClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…