Fix roborock config flow tests (#150135)

This commit is contained in:
Abílio Costa
2025-08-07 00:05:31 +01:00
committed by GitHub
parent e5d512d5e5
commit 35025c4b59

View File

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