aboutsummaryrefslogtreecommitdiffstats
path: root/test/http/http1/test_read.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-09-26 00:39:04 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-09-26 00:39:04 +0200
commit106f7046d3862cb0e3cbb4f38335af0330b4e7e3 (patch)
tree6a57a7c29062cad851d0b162a17e460b32ea3262 /test/http/http1/test_read.py
parent45f2ea33b2fdb67ca89e7eedd860ebe683770497 (diff)
downloadmitmproxy-106f7046d3862cb0e3cbb4f38335af0330b4e7e3.tar.gz
mitmproxy-106f7046d3862cb0e3cbb4f38335af0330b4e7e3.tar.bz2
mitmproxy-106f7046d3862cb0e3cbb4f38335af0330b4e7e3.zip
refactor request model
Diffstat (limited to 'test/http/http1/test_read.py')
-rw-r--r--test/http/http1/test_read.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/http/http1/test_read.py b/test/http/http1/test_read.py
index 9eb02a24..c3f744bf 100644
--- a/test/http/http1/test_read.py
+++ b/test/http/http1/test_read.py
@@ -16,8 +16,8 @@ from netlib.tutils import treq, tresp, raises
def test_read_request():
rfile = BytesIO(b"GET / HTTP/1.1\r\n\r\nskip")
r = read_request(rfile)
- assert r.method == b"GET"
- assert r.body == b""
+ assert r.method == "GET"
+ assert r.content == b""
assert r.timestamp_end
assert rfile.read() == b"skip"
@@ -32,7 +32,7 @@ def test_read_request_head():
rfile.reset_timestamps = Mock()
rfile.first_byte_timestamp = 42
r = read_request_head(rfile)
- assert r.method == b"GET"
+ assert r.method == "GET"
assert r.headers["Content-Length"] == "4"
assert r.body is None
assert rfile.reset_timestamps.called
@@ -283,7 +283,7 @@ class TestReadHeaders(object):
def test_read_chunked():
- req = treq(body=None)
+ req = treq(content=None)
req.headers["Transfer-Encoding"] = "chunked"
data = b"1\r\na\r\n0\r\n"