summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBert JW Regeer <bertjw@regeer.org>2018-11-11 17:04:31 -0700
committerBert JW Regeer <bertjw@regeer.org>2018-11-11 17:04:31 -0700
commitb5297529ef5a8dd3dd84c6cfa41afd101acfa8a2 (patch)
tree48cc0be96dcd1b7a1c08cecc5fc070fcec2bea24 /tests
parenteb0ab555c91bb688a8d628f9787a9e9f6da27f13 (diff)
downloadwebob-b5297529ef5a8dd3dd84c6cfa41afd101acfa8a2.tar.gz
Bring coverage back to 100%
Diffstat (limited to 'tests')
-rw-r--r--tests/test_response.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_response.py b/tests/test_response.py
index e044209..0c48ae0 100644
--- a/tests/test_response.py
+++ b/tests/test_response.py
@@ -173,6 +173,15 @@ def test_content_type_supports_unicode():
assert isinstance(resp.headers["Content-Type"], str)
+@pytest.mark.skipif("sys.version_info < (3, 0)")
+def test_content_type_not_binary():
+ content_type = b"text/html"
+ resp = Response()
+
+ with pytest.raises(TypeError):
+ resp.content_type = content_type
+
+
def test_cookies():
res = Response()
# test unicode value