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:
parent
9857c0fa3a
commit
4498c2e8c4
7 changed files with 84 additions and 10 deletions
|
@ -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}):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue