aboutsummaryrefslogtreecommitdiffstats
path: root/test/http/test_response.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-02-08 04:28:49 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-02-08 04:28:49 +0100
commit173ff0b235cdb45a8923f313807d9804830c2a2b (patch)
tree84c40269bd4a9913341f913f0566992e8c080114 /test/http/test_response.py
parentfe0ed63c4a3486402f65638b476149ebba752055 (diff)
downloadmitmproxy-173ff0b235cdb45a8923f313807d9804830c2a2b.tar.gz
mitmproxy-173ff0b235cdb45a8923f313807d9804830c2a2b.tar.bz2
mitmproxy-173ff0b235cdb45a8923f313807d9804830c2a2b.zip
fix py3 compat
Diffstat (limited to 'test/http/test_response.py')
-rw-r--r--test/http/test_response.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/http/test_response.py b/test/http/test_response.py
index c7d90b16..14588000 100644
--- a/test/http/test_response.py
+++ b/test/http/test_response.py
@@ -1,5 +1,7 @@
from __future__ import absolute_import, print_function, division
+import six
+
from netlib.http import Headers
from netlib.odict import ODict, ODictCaseless
from netlib.tutils import raises, tresp
@@ -8,7 +10,7 @@ from .test_message import _test_passthrough_attr, _test_decoded_attr
class TestResponseData(object):
def test_init(self):
- with raises(ValueError):
+ with raises(ValueError if six.PY2 else TypeError):
tresp(headers="foobar")
assert isinstance(tresp(headers=None).headers, Headers)