aboutsummaryrefslogtreecommitdiffstats
path: root/test/tutils.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2013-06-15 15:31:36 -0700
committerAldo Cortesi <aldo@corte.si>2013-06-15 15:31:36 -0700
commit34f286df511d0d6987a21e105a7cde651130fa2d (patch)
tree30d34a8e04572e39242ba20ceb3f9734e1b33a56 /test/tutils.py
parentd3beaa738223947390bc66cdb649bf3cbaba6c28 (diff)
parentba47690a030ab9c0008a4eb229413c01d1f5a477 (diff)
downloadmitmproxy-34f286df511d0d6987a21e105a7cde651130fa2d.tar.gz
mitmproxy-34f286df511d0d6987a21e105a7cde651130fa2d.tar.bz2
mitmproxy-34f286df511d0d6987a21e105a7cde651130fa2d.zip
Merge pull request #136 from mhils/fix_binary_rw
always read files in binary mode
Diffstat (limited to 'test/tutils.py')
-rw-r--r--test/tutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/tutils.py b/test/tutils.py
index 1a1c8724..fbce615a 100644
--- a/test/tutils.py
+++ b/test/tutils.py
@@ -20,7 +20,7 @@ def tresp(req=None):
req = treq()
headers = flow.ODictCaseless()
headers["header_response"] = ["svalue"]
- cert = certutils.SSLCert.from_der(file(test_data.path("data/dercert")).read())
+ cert = certutils.SSLCert.from_der(file(test_data.path("data/dercert"),"rb").read())
resp = flow.Response(req, (1, 1), 200, "message", headers, "content_response", cert)
resp.reply = controller.DummyReply()
return resp