aboutsummaryrefslogtreecommitdiffstats
path: root/test/netlib/http/http1/test_read.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/netlib/http/http1/test_read.py')
-rw-r--r--test/netlib/http/http1/test_read.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/netlib/http/http1/test_read.py b/test/netlib/http/http1/test_read.py
index 33f3802b..974aa895 100644
--- a/test/netlib/http/http1/test_read.py
+++ b/test/netlib/http/http1/test_read.py
@@ -105,6 +105,7 @@ class TestReadBody(object):
rfile = BytesIO(b"123456")
assert list(read_body(rfile, -1, max_chunk_size=1)) == [b"1", b"2", b"3", b"4", b"5", b"6"]
+
def test_connection_close():
headers = Headers()
assert connection_close(b"HTTP/1.0", headers)
@@ -120,6 +121,7 @@ def test_connection_close():
assert connection_close(b"HTTP/1.0", headers)
assert not connection_close(b"HTTP/1.1", headers)
+
def test_expected_http_body_size():
# Expect: 100-continue
assert expected_http_body_size(
@@ -202,6 +204,7 @@ def test_read_request_line():
with raises(HttpReadDisconnect):
t(b"")
+
def test_parse_authority_form():
assert _parse_authority_form(b"foo:42") == (b"foo", 42)
with raises(HttpSyntaxException):
@@ -301,6 +304,7 @@ class TestReadHeaders(object):
headers = self._read(data)
assert headers.fields == ((b"bar", b""),)
+
def test_read_chunked():
req = treq(content=None)
req.headers["Transfer-Encoding"] = "chunked"