Fix MotionEye config flow (#64360)

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
ZuluWhiskey
2022-02-01 09:59:19 -08:00
committed by Paulus Schoutsen
co-authored by Paulus Schoutsen Paulus Schoutsen
parent 5082582769
commit 7fe1b85495
2 changed files with 27 additions and 11 deletions
@@ -480,6 +480,24 @@ async def test_advanced_options(hass: HomeAssistant) -> None:
) as mock_setup_entry:
await hass.async_block_till_done()
result = await hass.config_entries.options.async_init(
config_entry.entry_id, context={"show_advanced_options": True}
)
result = await hass.config_entries.options.async_configure(
result["flow_id"],
user_input={
CONF_WEBHOOK_SET: True,
CONF_WEBHOOK_SET_OVERWRITE: True,
},
)
await hass.async_block_till_done()
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
assert result["data"][CONF_WEBHOOK_SET]
assert result["data"][CONF_WEBHOOK_SET_OVERWRITE]
assert CONF_STREAM_URL_TEMPLATE not in result["data"]
assert len(mock_setup.mock_calls) == 0
assert len(mock_setup_entry.mock_calls) == 0
result = await hass.config_entries.options.async_init(
config_entry.entry_id, context={"show_advanced_options": True}
)