diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/http/http1/test_protocol.py | 5 | ||||
-rw-r--r-- | test/http/http2/test_protocol.py | 5 | ||||
-rw-r--r-- | test/websockets/test_websockets.py | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/test/http/http1/test_protocol.py b/test/http/http1/test_protocol.py index 31bf7dab..6704647f 100644 --- a/test/http/http1/test_protocol.py +++ b/test/http/http1/test_protocol.py @@ -376,9 +376,8 @@ class TestReadRequest(object): class TestReadResponse(object): def tst(self, data, method, body_size_limit, include_body=True): data = textwrap.dedent(data) - request = http.EmptyRequest(method=method) return mock_protocol(data).read_response( - request, body_size_limit, include_body=include_body + method, body_size_limit, include_body=include_body ) def test_errors(self): @@ -458,7 +457,7 @@ class TestReadResponseNoContentLength(tservers.ServerTestBase): def test_no_content_length(self): c = tcp.TCPClient(("127.0.0.1", self.port)) c.connect() - resp = HTTP1Protocol(c).read_response(http.EmptyRequest(method="GET"), None) + resp = HTTP1Protocol(c).read_response("GET", None) assert resp.body == "bar\r\n\r\n" diff --git a/test/http/http2/test_protocol.py b/test/http/http2/test_protocol.py index 92fa109c..8810894f 100644 --- a/test/http/http2/test_protocol.py +++ b/test/http/http2/test_protocol.py @@ -410,9 +410,8 @@ class TestReadResponse(tservers.ServerTestBase): protocol = HTTP2Protocol(c) protocol.connection_preface_performed = True - resp = protocol.read_response(http.EmptyRequest(stream_id=42)) + resp = protocol.read_response(stream_id=42) - assert resp.stream_id == 42 assert resp.httpversion == (2, 0) assert resp.status_code == 200 assert resp.msg == "" @@ -437,7 +436,7 @@ class TestReadEmptyResponse(tservers.ServerTestBase): protocol = HTTP2Protocol(c) protocol.connection_preface_performed = True - resp = protocol.read_response(http.EmptyRequest(stream_id=42)) + resp = protocol.read_response(stream_id=42) assert resp.stream_id == 42 assert resp.httpversion == (2, 0) diff --git a/test/websockets/test_websockets.py b/test/websockets/test_websockets.py index 5f27c128..be87b20a 100644 --- a/test/websockets/test_websockets.py +++ b/test/websockets/test_websockets.py @@ -70,7 +70,7 @@ class WebSocketsClient(tcp.TCPClient): self.wfile.write(headers.format() + "\r\n") self.wfile.flush() - resp = http1_protocol.read_response(http.EmptyRequest(method="GET"), None) + resp = http1_protocol.read_response("GET", None) server_nonce = self.protocol.check_server_handshake(resp.headers) if not server_nonce == self.protocol.create_server_nonce( |