Use start_reauth helper method in integration tests (t) (#124794)

This commit is contained in:
epenet 2024-08-28 16:47:10 +02:00 committed by GitHub
parent dd52f4c84a
commit 7652c35ee6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 61 additions and 366 deletions

View file

@ -9,7 +9,7 @@ from homeassistant.components.totalconnect.const import (
CONF_USERCODES,
DOMAIN,
)
from homeassistant.config_entries import SOURCE_REAUTH, SOURCE_USER
from homeassistant.config_entries import SOURCE_USER
from homeassistant.const import CONF_PASSWORD
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType
@ -141,9 +141,7 @@ async def test_reauth(hass: HomeAssistant) -> None:
)
entry.add_to_hass(hass)
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_REAUTH}, data=entry.data
)
result = await entry.start_reauth_flow(hass)
assert result["type"] is FlowResultType.FORM
assert result["step_id"] == "reauth_confirm"