mirror of
https://github.com/home-assistant/core.git
synced 2025-09-08 14:21:33 +02:00
Fix roborock config flow tests (#150135)
This commit is contained in:
@@ -239,8 +239,11 @@ async def test_reauth_flow(
|
||||
assert result["step_id"] == "reauth_confirm"
|
||||
|
||||
# Request a new code
|
||||
with patch(
|
||||
"homeassistant.components.roborock.config_flow.RoborockApiClient.request_code"
|
||||
with (
|
||||
patch(
|
||||
"homeassistant.components.roborock.config_flow.RoborockApiClient.request_code"
|
||||
),
|
||||
patch("homeassistant.components.roborock.async_setup_entry", return_value=True),
|
||||
):
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"], user_input={}
|
||||
@@ -250,9 +253,12 @@ async def test_reauth_flow(
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
new_user_data = deepcopy(USER_DATA)
|
||||
new_user_data.rriot.s = "new_password_hash"
|
||||
with patch(
|
||||
"homeassistant.components.roborock.config_flow.RoborockApiClient.code_login",
|
||||
return_value=new_user_data,
|
||||
with (
|
||||
patch(
|
||||
"homeassistant.components.roborock.config_flow.RoborockApiClient.code_login",
|
||||
return_value=new_user_data,
|
||||
),
|
||||
patch("homeassistant.components.roborock.async_setup_entry", return_value=True),
|
||||
):
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"], user_input={CONF_ENTRY_CODE: "123456"}
|
||||
|
Reference in New Issue
Block a user