aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/http/http1/test_protocol.py10
-rw-r--r--test/http/http2/test_protocol.py6
2 files changed, 8 insertions, 8 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"
diff --git a/test/http/http2/test_protocol.py b/test/http/http2/test_protocol.py
index f41b9565..34e4ef50 100644
--- a/test/http/http2/test_protocol.py
+++ b/test/http/http2/test_protocol.py
@@ -257,7 +257,7 @@ class TestReadResponse(tservers.ServerTestBase):
assert resp.status_code == "200"
assert resp.msg == ""
assert resp.headers == {':status': '200', 'etag': 'foobar'}
- assert resp.content == b'foobar'
+ assert resp.body == b'foobar'
class TestReadEmptyResponse(tservers.ServerTestBase):
@@ -283,7 +283,7 @@ class TestReadEmptyResponse(tservers.ServerTestBase):
assert resp.status_code == "200"
assert resp.msg == ""
assert resp.headers == {':status': '200', 'etag': 'foobar'}
- assert resp.content == b''
+ assert resp.body == b''
class TestReadRequest(tservers.ServerTestBase):
@@ -308,7 +308,7 @@ class TestReadRequest(tservers.ServerTestBase):
assert resp.stream_id
assert resp.headers == {':method': 'GET', ':path': '/', ':scheme': 'https'}
- assert resp.content == b'foobar'
+ assert resp.body == b'foobar'
class TestCreateResponse():