mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Hive auth fix for users (#73247)
This commit is contained in:
@@ -33,16 +33,6 @@ async def test_import_flow(hass):
|
||||
"AccessToken": "mock-access-token",
|
||||
},
|
||||
},
|
||||
), patch(
|
||||
"homeassistant.components.hive.config_flow.Auth.device_registration",
|
||||
return_value=True,
|
||||
), patch(
|
||||
"homeassistant.components.hive.config_flow.Auth.getDeviceData",
|
||||
return_value=[
|
||||
"mock-device-group-key",
|
||||
"mock-device-key",
|
||||
"mock-device-password",
|
||||
],
|
||||
), patch(
|
||||
"homeassistant.components.hive.async_setup", return_value=True
|
||||
) as mock_setup, patch(
|
||||
@@ -67,11 +57,6 @@ async def test_import_flow(hass):
|
||||
},
|
||||
"ChallengeName": "SUCCESS",
|
||||
},
|
||||
"device_data": [
|
||||
"mock-device-group-key",
|
||||
"mock-device-key",
|
||||
"mock-device-password",
|
||||
],
|
||||
}
|
||||
assert len(hass.config_entries.async_entries(DOMAIN)) == 1
|
||||
assert len(mock_setup.mock_calls) == 1
|
||||
@@ -96,16 +81,6 @@ async def test_user_flow(hass):
|
||||
"AccessToken": "mock-access-token",
|
||||
},
|
||||
},
|
||||
), patch(
|
||||
"homeassistant.components.hive.config_flow.Auth.device_registration",
|
||||
return_value=True,
|
||||
), patch(
|
||||
"homeassistant.components.hive.config_flow.Auth.getDeviceData",
|
||||
return_value=[
|
||||
"mock-device-group-key",
|
||||
"mock-device-key",
|
||||
"mock-device-password",
|
||||
],
|
||||
), patch(
|
||||
"homeassistant.components.hive.async_setup", return_value=True
|
||||
) as mock_setup, patch(
|
||||
@@ -130,11 +105,6 @@ async def test_user_flow(hass):
|
||||
},
|
||||
"ChallengeName": "SUCCESS",
|
||||
},
|
||||
"device_data": [
|
||||
"mock-device-group-key",
|
||||
"mock-device-key",
|
||||
"mock-device-password",
|
||||
],
|
||||
}
|
||||
|
||||
assert len(mock_setup.mock_calls) == 1
|
||||
|
||||
Reference in New Issue
Block a user