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

@ -798,6 +798,9 @@ async def test_options_flow(hass: HomeAssistant, client) -> None:
description_placeholders={"enabled": "Set to true to be true"},
)
async def async_step_user(self, user_input=None):
raise NotImplementedError
return OptionsFlowHandler()
mock_integration(hass, MockModule("test"))
@ -1271,6 +1274,9 @@ async def test_ignore_flow(
await self.async_set_unique_id("mock-unique-id")
return self.async_show_form(step_id="account")
async def async_step_account(self, user_input=None):
raise NotImplementedError
ws_client = await hass_ws_client(hass)
with patch.dict(HANDLERS, {"test": TestFlow}):