1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 01:03:24 +00:00

support ClientResponse.text(errors=) kwarg

This commit is contained in:
Thomas Grainger
2018-10-15 02:55:59 +01:00
parent 8fdc6dbb68
commit 4ef5205094
2 changed files with 4 additions and 2 deletions

View File

@@ -28,8 +28,8 @@ class MockClientResponse(ClientResponse):
async def json(self, *, encoding='utf-8', loads=json.loads, **kwargs): # NOQA: E999
return loads(self._body.decode(encoding))
async def text(self, encoding='utf-8'):
return self._body.decode(encoding)
async def text(self, encoding='utf-8', errors='strict'):
return self._body.decode(encoding, errors=errors)
async def read(self):
return self._body