mirror of
https://github.com/home-assistant/core.git
synced 2025-12-25 05:26:47 +00:00
Try to load integration before starting option flow (#90111)
* Try to load integration before starting option flow * Adjust tests
This commit is contained in:
@@ -793,6 +793,8 @@ async def test_options_flow(hass: HomeAssistant, client) -> None:
|
||||
|
||||
return OptionsFlowHandler()
|
||||
|
||||
mock_integration(hass, MockModule("test"))
|
||||
mock_entity_platform(hass, "config_flow.test", None)
|
||||
MockConfigEntry(
|
||||
domain="test",
|
||||
entry_id="test1",
|
||||
@@ -824,6 +826,7 @@ async def test_two_step_options_flow(hass: HomeAssistant, client) -> None:
|
||||
mock_integration(
|
||||
hass, MockModule("test", async_setup_entry=AsyncMock(return_value=True))
|
||||
)
|
||||
mock_entity_platform(hass, "config_flow.test", None)
|
||||
|
||||
class TestFlow(core_ce.ConfigFlow):
|
||||
@staticmethod
|
||||
@@ -889,6 +892,7 @@ async def test_options_flow_with_invalid_data(hass: HomeAssistant, client) -> No
|
||||
mock_integration(
|
||||
hass, MockModule("test", async_setup_entry=AsyncMock(return_value=True))
|
||||
)
|
||||
mock_entity_platform(hass, "config_flow.test", None)
|
||||
|
||||
class TestFlow(core_ce.ConfigFlow):
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user