diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-08-24 18:17:04 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-08-24 18:17:04 +0200 |
commit | 56a4bc381efc177c08ed7b9e7c845f74120050e4 (patch) | |
tree | 579bebfecc1d4c3012daf1bcd76a10141d82e30f /test | |
parent | f1f34e7713295adb8f54b13ec50d74d43cd42841 (diff) | |
download | mitmproxy-56a4bc381efc177c08ed7b9e7c845f74120050e4.tar.gz mitmproxy-56a4bc381efc177c08ed7b9e7c845f74120050e4.tar.bz2 mitmproxy-56a4bc381efc177c08ed7b9e7c845f74120050e4.zip |
request -> request_method
Diffstat (limited to 'test')
-rw-r--r-- | test/test_protocol_http.py | 8 | ||||
-rw-r--r-- | test/test_proxy.py | 2 |
2 files changed, 5 insertions, 5 deletions
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() |