Allow textual responses when using test_client and aiohttp 2
This commit is contained in:
parent
b37e6187d4
commit
9fac37588c
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user