MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_disk_full

Function test_disk_full

test/mitmproxy/addons/test_save.py:184–199  ·  view source on GitHub ↗
(tmp_path, monkeypatch, capsys)

Source from the content-addressed store, hash-verified

182
183
184def test_disk_full(tmp_path, monkeypatch, capsys):
185 sa = save.Save()
186 with taddons.context(sa) as tctx:
187 tctx.configure(sa, save_stream_file=str(tmp_path / "foo.txt"))
188
189 def _raise(*_):
190 raise OSError("wat")
191
192 monkeypatch.setattr(sa, "maybe_rotate_to_new_file", _raise)
193
194 f = tflow.tflow(resp=True)
195 sa.request(f)
196 with pytest.raises(SystemExit):
197 sa.response(f)
198
199 assert "Error while writing" in capsys.readouterr().err

Callers

nothing calls this directly

Calls 4

requestMethod · 0.95
responseMethod · 0.95
contextMethod · 0.80
configureMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…