aboutsummaryrefslogtreecommitdiffstats
path: root/test/http/test_response.py
diff options
context:
space:
mode:
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 a1f4abd7..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(AssertionError):
+ with raises(ValueError if six.PY2 else TypeError):
tresp(headers="foobar")
assert isinstance(tresp(headers=None).headers, Headers)