Fix aiohttp deprecation warnings (#13240)
* Fix aiohttp deprecation warnings * Fix Ring deprecation warning * Lint
This commit is contained in:
parent
a86bf81768
commit
89a19c89a7
45 changed files with 221 additions and 225 deletions
|
@ -82,7 +82,8 @@ class AiohttpClientMocker:
|
|||
def create_session(self, loop):
|
||||
"""Create a ClientSession that is bound to this mocker."""
|
||||
session = ClientSession(loop=loop)
|
||||
session._request = self.match_request
|
||||
# Setting directly on `session` will raise deprecation warning
|
||||
object.__setattr__(session, '_request', self.match_request)
|
||||
return session
|
||||
|
||||
async def match_request(self, method, url, *, data=None, auth=None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue