MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / test_receive_buffer

Function test_receive_buffer

test/mitmproxy/proxy/test_utils.py:25–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24
25def test_receive_buffer():
26 buf = ReceiveBuffer()
27 assert len(buf) == 0
28 assert bytes(buf) == b""
29 assert not buf
30
31 buf += b"foo"
32 assert len(buf) == 3
33 assert bytes(buf) == b"foo"
34 assert buf
35
36 buf += b"bar"
37 assert len(buf) == 6
38 assert bytes(buf) == b"foobar"
39 assert buf
40
41 buf.clear()
42 assert len(buf) == 0
43 assert bytes(buf) == b""
44 assert not buf

Callers

nothing calls this directly

Calls 2

clearMethod · 0.95
ReceiveBufferClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…