Source
diff --git test/mitmproxy/addons/test_readfile.py test/mitmproxy/addons/test_readfile.py
index 3d28d8b7d..94e18cdb3 100644
--- test/mitmproxy/addons/test_readfile.py
+++ test/mitmproxy/addons/test_readfile.py
@pytest.fixture
-def corrupt_data():
- f = data()
+def corrupt_data(data):
+ f = io.BytesIO(data.getvalue())
f.seek(0, io.SEEK_END)
f.write(b"qibble")
f.seek(0)