Validate steps in Flowhandler (#102152)

* Validate steps in Flowhandler

* Move validation to FlowManager._async_handle_step

* Fix _raise_if_not_has_step

* Fix config_entries tests

* Fix tests

* Rename

* Add test
This commit is contained in:
Erik Montnemery 2023-10-19 13:34:10 +02:00 committed by GitHub
parent 9857c0fa3a
commit 4498c2e8c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 84 additions and 10 deletions

View file

@ -77,7 +77,10 @@ async def test_invalid_credentials(hass: HomeAssistant) -> None:
),
), patch(
"homeassistant.components.abode.config_flow.AbodeFlowHandler.async_step_reauth",
return_value={"type": data_entry_flow.FlowResultType.FORM},
return_value={
"type": data_entry_flow.FlowResultType.FORM,
"step_id": "reauth_confirm",
},
) as mock_async_step_reauth:
await setup_platform(hass, ALARM_DOMAIN)