Allow textual responses when using test_client and aiohttp 2

This commit is contained in:
Nikola Kolevski 2017-06-20 13:15:30 +02:00
parent b37e6187d4
commit 9fac37588c

View File

@ -32,7 +32,7 @@ class SanicTestClient:
try: try:
response.json = await response.json() response.json = await response.json()
except (JSONDecodeError, UnicodeDecodeError): except (JSONDecodeError, UnicodeDecodeError, aiohttp.ClientResponseError):
response.json = None response.json = None
response.body = await response.read() response.body = await response.read()