aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_dump.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2013-06-16 00:23:44 +0200
committerMaximilian Hils <git@maximilianhils.com>2013-06-16 00:23:44 +0200
commitba47690a030ab9c0008a4eb229413c01d1f5a477 (patch)
tree30d34a8e04572e39242ba20ceb3f9734e1b33a56 /test/test_dump.py
parentd3beaa738223947390bc66cdb649bf3cbaba6c28 (diff)
downloadmitmproxy-ba47690a030ab9c0008a4eb229413c01d1f5a477.tar.gz
mitmproxy-ba47690a030ab9c0008a4eb229413c01d1f5a477.tar.bz2
mitmproxy-ba47690a030ab9c0008a4eb229413c01d1f5a477.zip
always read files in binary mode
Diffstat (limited to 'test/test_dump.py')
-rw-r--r--test/test_dump.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_dump.py b/test/test_dump.py
index 94d0b195..6a35cdec 100644
--- a/test/test_dump.py
+++ b/test/test_dump.py
@@ -46,7 +46,7 @@ class TestDumpMaster:
return cs.getvalue()
def _flowfile(self, path):
- f = open(path, "w")
+ f = open(path, "wb")
fw = flow.FlowWriter(f)
t = tutils.tflow_full()
t.response = tutils.tresp(t.request)
@@ -128,7 +128,7 @@ class TestDumpMaster:
with tutils.tmpdir() as d:
p = os.path.join(d, "a")
self._dummy_cycle(1, None, "", wfile=p, verbosity=0)
- assert len(list(flow.FlowReader(open(p)).stream())) == 1
+ assert len(list(flow.FlowReader(open(p,"rb")).stream())) == 1
def test_write_err(self):
tutils.raises(