diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-07-19 18:17:30 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-07-22 15:30:51 +0200 |
commit | d62dbee0f6cd47b4cad1ee7cc731b413600c0add (patch) | |
tree | 9957a5f77ca521cc6ddaafd36200a4b3ae000596 /test/http/http1/test_protocol.py | |
parent | 37a0cb858cda255bac8f06749a81859c82c5177f (diff) | |
download | mitmproxy-d62dbee0f6cd47b4cad1ee7cc731b413600c0add.tar.gz mitmproxy-d62dbee0f6cd47b4cad1ee7cc731b413600c0add.tar.bz2 mitmproxy-d62dbee0f6cd47b4cad1ee7cc731b413600c0add.zip |
rename content -> body
Diffstat (limited to 'test/http/http1/test_protocol.py')
-rw-r--r-- | test/http/http1/test_protocol.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/http/http1/test_protocol.py b/test/http/http1/test_protocol.py index 6b8a884c..936fe20d 100644 --- a/test/http/http1/test_protocol.py +++ b/test/http/http1/test_protocol.py @@ -296,7 +296,7 @@ class TestReadResponseNoContentLength(tservers.ServerTestBase): c = tcp.TCPClient(("127.0.0.1", self.port)) c.connect() resp = HTTP1Protocol(c).read_response("GET", None) - assert resp.content == "bar\r\n\r\n" + assert resp.body == "bar\r\n\r\n" def test_read_response(): @@ -344,8 +344,8 @@ def test_read_response(): foo """ - assert tst(data, "GET", None).content == 'foo' - assert tst(data, "HEAD", None).content == '' + assert tst(data, "GET", None).body == 'foo' + assert tst(data, "HEAD", None).body == '' data = """ HTTP/1.1 200 OK @@ -361,7 +361,7 @@ def test_read_response(): foo """ - assert tst(data, "GET", None, include_body=False).content is None + assert tst(data, "GET", None, include_body=False).body is None def test_get_request_line(): @@ -438,5 +438,5 @@ class TestReadRequest(): p = mock_protocol(data) v = p.read_request() assert p.tcp_handler.wfile.getvalue() == "HTTP/1.1 100 Continue\r\n\r\n" - assert v.content == "foo" + assert v.body == "foo" assert p.tcp_handler.rfile.read(3) == "bar" |