From 56a4bc381efc177c08ed7b9e7c845f74120050e4 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 24 Aug 2015 18:17:04 +0200 Subject: request -> request_method --- test/test_protocol_http.py | 8 ++++---- test/test_proxy.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/test_protocol_http.py b/test/test_protocol_http.py index 940d6c7a..cd0f77fa 100644 --- a/test/test_protocol_http.py +++ b/test/test_protocol_http.py @@ -28,19 +28,19 @@ class TestHTTPResponse: "\r\n" protocol = mock_protocol(s) - r = HTTPResponse.from_protocol(protocol, netlib.http.EmptyRequest(method="GET")) + r = HTTPResponse.from_protocol(protocol, "GET") assert r.status_code == 200 assert r.content == "content" - assert HTTPResponse.from_protocol(protocol, netlib.http.EmptyRequest(method="GET")).status_code == 204 + assert HTTPResponse.from_protocol(protocol, "GET").status_code == 204 protocol = mock_protocol(s) # HEAD must not have content by spec. We should leave it on the pipe. - r = HTTPResponse.from_protocol(protocol, netlib.http.EmptyRequest(method="HEAD")) + r = HTTPResponse.from_protocol(protocol, "HEAD") assert r.status_code == 200 assert r.content == "" tutils.raises( "Invalid server response: 'content", - HTTPResponse.from_protocol, protocol, netlib.http.EmptyRequest(method="GET") + HTTPResponse.from_protocol, protocol, "GET" ) diff --git a/test/test_proxy.py b/test/test_proxy.py index b9eec53b..6ab19e02 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -36,7 +36,7 @@ class TestServerConnection: sc.send(protocol.assemble(f.request)) protocol = http.http1.HTTP1Protocol(rfile=sc.rfile) - assert protocol.read_response(f.request, 1000) + assert protocol.read_response(f.request.method, 1000) assert self.d.last_log() sc.finish() -- cgit v1.2.3