aboutsummaryrefslogtreecommitdiffstats
path: root/test/http/http1/test_read.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/http/http1/test_read.py')
-rw-r--r--test/http/http1/test_read.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/http/http1/test_read.py b/test/http/http1/test_read.py
index 5e6680af..55def2a5 100644
--- a/test/http/http1/test_read.py
+++ b/test/http/http1/test_read.py
@@ -108,14 +108,14 @@ class TestReadBody(object):
def test_connection_close():
headers = Headers()
- assert connection_close((1, 0), headers)
- assert not connection_close((1, 1), headers)
+ assert connection_close(b"HTTP/1.0", headers)
+ assert not connection_close(b"HTTP/1.1", headers)
headers["connection"] = "keep-alive"
- assert not connection_close((1, 1), headers)
+ assert not connection_close(b"HTTP/1.1", headers)
headers["connection"] = "close"
- assert connection_close((1, 1), headers)
+ assert connection_close(b"HTTP/1.1", headers)
def test_expected_http_body_size():
@@ -281,6 +281,10 @@ class TestReadHeaders(object):
with raises(HttpSyntaxException):
self._read(data)
+ def test_read_empty_name(self):
+ data = b":foo"
+ with raises(HttpSyntaxException):
+ self._read(data)
def test_read_chunked():
req = treq(body=None)