From 827fe824d97d96779512c8a4032d9b30d516d63f Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Mon, 27 Jul 2015 09:36:50 +0200 Subject: move code from mitmproxy to netlib --- test/http/http1/test_protocol.py | 4 ++-- test/http/http2/test_protocol.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/http/http1/test_protocol.py b/test/http/http1/test_protocol.py index dcebbd5e..b196b7a3 100644 --- a/test/http/http1/test_protocol.py +++ b/test/http/http1/test_protocol.py @@ -297,10 +297,10 @@ class TestReadResponseNoContentLength(tservers.ServerTestBase): def test_read_response(): - def tst(data, method, limit, include_body=True): + def tst(data, method, body_size_limit, include_body=True): data = textwrap.dedent(data) return mock_protocol(data).read_response( - method, limit, include_body=include_body + method, body_size_limit, include_body=include_body ) tutils.raises("server disconnect", tst, "", "GET", None) diff --git a/test/http/http2/test_protocol.py b/test/http/http2/test_protocol.py index d3040266..0216128f 100644 --- a/test/http/http2/test_protocol.py +++ b/test/http/http2/test_protocol.py @@ -253,7 +253,7 @@ class TestReadResponse(tservers.ServerTestBase): resp = protocol.read_response() - assert resp.httpversion == "HTTP/2" + assert resp.httpversion == (2, 0) assert resp.status_code == "200" assert resp.msg == "" assert resp.headers.lst == [[':status', '200'], ['etag', 'foobar']] @@ -279,7 +279,7 @@ class TestReadEmptyResponse(tservers.ServerTestBase): resp = protocol.read_response() assert resp.stream_id - assert resp.httpversion == "HTTP/2" + assert resp.httpversion == (2, 0) assert resp.status_code == "200" assert resp.msg == "" assert resp.headers.lst == [[':status', '200'], ['etag', 'foobar']] -- cgit v1.2.3