1
0
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:
Khole
2022-06-10 04:54:24 +01:00
committed by GitHub
parent d3f01f7ea9
commit 1dd7781acc
5 changed files with 8 additions and 35 deletions

View File

@@ -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