MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_tcp

Function test_tcp

test/mitmproxy/addons/test_save.py:32–47  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

30
31
32def test_tcp(tmp_path):
33 sa = save.Save()
34 with taddons.context(sa) as tctx:
35 p = str(tmp_path / "foo")
36 tctx.configure(sa, save_stream_file=p)
37
38 tt = tflow.ttcpflow()
39 sa.tcp_start(tt)
40 sa.tcp_end(tt)
41
42 tt = tflow.ttcpflow()
43 sa.tcp_start(tt)
44 sa.tcp_error(tt)
45
46 tctx.configure(sa, save_stream_file=None)
47 assert len(rd(p)) == 2
48
49
50def test_udp(tmp_path):

Callers

nothing calls this directly

Calls 6

tcp_startMethod · 0.95
tcp_endMethod · 0.95
tcp_errorMethod · 0.95
contextMethod · 0.80
rdFunction · 0.70
configureMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…