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

Method test_har

test/mitmproxy/io/test_io.py:34–41  ·  view source on GitHub ↗
(self, file)

Source from the content-addressed store, hash-verified

32 "file", [pytest.param(x, id=x.stem) for x in here.glob("har_files/*.har")]
33 )
34 def test_har(self, file):
35 with open(file, "rb") as f:
36 reader = FlowReader(f)
37 try:
38 for _ in reader.stream():
39 pass
40 except exceptions.FlowReadException:
41 pass # should never raise anything else.
42
43 def test_empty(self):
44 assert list(FlowReader(io.BytesIO(b"")).stream()) == []

Callers

nothing calls this directly

Calls 2

streamMethod · 0.95
FlowReaderClass · 0.90

Tested by

no test coverage detected