commented aiohttp load response body in testing

This commit is contained in:
ivan 2017-03-23 20:06:39 +08:00
parent 85f27320e7
commit ee27c689e1

View File

@ -22,8 +22,8 @@ class SanicTestClient:
cookies=cookies, connector=conn) as session: cookies=cookies, connector=conn) as session:
async with getattr( async with getattr(
session, method.lower())(url, *args, **kwargs) as response: session, method.lower())(url, *args, **kwargs) as response:
response.text = await response.text() # response.text = await response.text()
response.body = await response.read() # response.body = await response.read()
return response return response
def _sanic_endpoint_test( def _sanic_endpoint_test(