Bumps aiohttp to 3.6.0 (#26728)

This commit is contained in:
Franck Nijhof 2019-09-19 20:34:41 +02:00 committed by Pascal Vizeli
parent 468deef326
commit a8a485abf7
6 changed files with 51 additions and 17 deletions

View file

@ -244,8 +244,12 @@ class AiohttpClientMockResponse:
def raise_for_status(self):
"""Raise error if status is 400 or higher."""
if self.status >= 400:
request_info = mock.Mock(real_url="http://example.com")
raise ClientResponseError(
None, None, code=self.status, headers=self.headers
request_info=request_info,
history=None,
code=self.status,
headers=self.headers,
)
def close(self):