Use start_reauth_flow helper in switcher_kis tests (#127098)

This commit is contained in:
epenet 2024-09-30 14:28:33 +02:00 committed by GitHub
parent 4bb768f39c
commit e1db5f3cac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -193,15 +193,7 @@ async def test_reauth_successful(
)
entry.add_to_hass(hass)
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={
"source": config_entries.SOURCE_REAUTH,
"entry_id": entry.entry_id,
},
data=entry.data,
)
result = await entry.start_reauth_flow(hass)
assert result["type"] is FlowResultType.FORM
assert result["step_id"] == "reauth_confirm"
@ -226,15 +218,7 @@ async def test_reauth_invalid_auth(hass: HomeAssistant) -> None:
)
entry.add_to_hass(hass)
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={
"source": config_entries.SOURCE_REAUTH,
"entry_id": entry.entry_id,
},
data=entry.data,
)
result = await entry.start_reauth_flow(hass)
assert result["type"] is FlowResultType.FORM
assert result["step_id"] == "reauth_confirm"