Merge pull request #809 from jrocketfingers/feature/allow-textual-responses
Allow textual responses when using test_client and aiohttp 2
This commit is contained in:
commit
10a363b275
|
@ -32,7 +32,9 @@ class SanicTestClient:
|
|||
|
||||
try:
|
||||
response.json = await response.json()
|
||||
except (JSONDecodeError, UnicodeDecodeError):
|
||||
except (JSONDecodeError,
|
||||
UnicodeDecodeError,
|
||||
aiohttp.ClientResponseError):
|
||||
response.json = None
|
||||
|
||||
response.body = await response.read()
|
||||
|
|
Loading…
Reference in New Issue
Block a user