Bumps aiohttp to 3.6.0 (#26728)
This commit is contained in:
1 parent
468deef326
commit
a8a485abf7
6 files changed
+51
-17
No files matched your search
@@ -84,7 +84,10 @@ async def test_token_unauthorized(hass, smartthings_mock):
|
||||
flow = SmartThingsFlowHandler()
|
||||
flow.hass = hass
|
||||
|
||||
smartthings_mock.apps.side_effect = ClientResponseError(None, None, status=401)
|
||||
request_info = Mock(real_url="http://example.com")
|
||||
smartthings_mock.apps.side_effect = ClientResponseError(
|
||||
request_info=request_info, history=None, status=401
|
||||
)
|
||||
|
||||
result = await flow.async_step_user({"access_token": str(uuid4())})
|
||||
|
||||
@@ -98,7 +101,10 @@ async def test_token_forbidden(hass, smartthings_mock):
|
||||
flow = SmartThingsFlowHandler()
|
||||
flow.hass = hass
|
||||
|
||||
smartthings_mock.apps.side_effect = ClientResponseError(None, None, status=403)
|
||||
request_info = Mock(real_url="http://example.com")
|
||||
smartthings_mock.apps.side_effect = ClientResponseError(
|
||||
request_info=request_info, history=None, status=403
|
||||
)
|
||||
|
||||
result = await flow.async_step_user({"access_token": str(uuid4())})
|
||||
|
||||
@@ -113,7 +119,10 @@ async def test_webhook_error(hass, smartthings_mock):
|
||||
flow.hass = hass
|
||||
|
||||
data = {"error": {}}
|
||||
error = APIResponseError(None, None, data=data, status=422)
|
||||
request_info = Mock(real_url="http://example.com")
|
||||
error = APIResponseError(
|
||||
request_info=request_info, history=None, data=data, status=422
|
||||
)
|
||||
error.is_target_error = Mock(return_value=True)
|
||||
|
||||
smartthings_mock.apps.side_effect = error
|
||||
@@ -131,7 +140,10 @@ async def test_api_error(hass, smartthings_mock):
|
||||
flow.hass = hass
|
||||
|
||||
data = {"error": {}}
|
||||
error = APIResponseError(None, None, data=data, status=400)
|
||||
request_info = Mock(real_url="http://example.com")
|
||||
error = APIResponseError(
|
||||
request_info=request_info, history=None, data=data, status=400
|
||||
)
|
||||
|
||||
smartthings_mock.apps.side_effect = error
|
||||
|
||||
@@ -147,7 +159,10 @@ async def test_unknown_api_error(hass, smartthings_mock):
|
||||
flow = SmartThingsFlowHandler()
|
||||
flow.hass = hass
|
||||
|
||||
smartthings_mock.apps.side_effect = ClientResponseError(None, None, status=404)
|
||||
request_info = Mock(real_url="http://example.com")
|
||||
smartthings_mock.apps.side_effect = ClientResponseError(
|
||||
request_info=request_info, history=None, status=404
|
||||
)
|
||||
|
||||
result = await flow.async_step_user({"access_token": str(uuid4())})
|
||||
|
||||
|
||||
Reference in new issue
Block a user