mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Fix ezviz options flow test patch (#52125)
This commit is contained in:
parent
742159a6a6
commit
ed4a3d275a
@ -238,7 +238,7 @@ async def test_async_step_discovery(
|
|||||||
|
|
||||||
async def test_options_flow(hass):
|
async def test_options_flow(hass):
|
||||||
"""Test updating options."""
|
"""Test updating options."""
|
||||||
with patch("homeassistant.components.ezviz.PLATFORMS", []):
|
with _patch_async_setup_entry() as mock_setup_entry:
|
||||||
entry = await init_integration(hass)
|
entry = await init_integration(hass)
|
||||||
|
|
||||||
assert entry.options[CONF_FFMPEG_ARGUMENTS] == DEFAULT_FFMPEG_ARGUMENTS
|
assert entry.options[CONF_FFMPEG_ARGUMENTS] == DEFAULT_FFMPEG_ARGUMENTS
|
||||||
@ -249,7 +249,6 @@ async def test_options_flow(hass):
|
|||||||
assert result["step_id"] == "init"
|
assert result["step_id"] == "init"
|
||||||
assert result["errors"] is None
|
assert result["errors"] is None
|
||||||
|
|
||||||
with _patch_async_setup_entry() as mock_setup_entry:
|
|
||||||
result = await hass.config_entries.options.async_configure(
|
result = await hass.config_entries.options.async_configure(
|
||||||
result["flow_id"],
|
result["flow_id"],
|
||||||
user_input={CONF_FFMPEG_ARGUMENTS: "/H.264", CONF_TIMEOUT: 25},
|
user_input={CONF_FFMPEG_ARGUMENTS: "/H.264", CONF_TIMEOUT: 25},
|
||||||
@ -260,7 +259,7 @@ async def test_options_flow(hass):
|
|||||||
assert result["data"][CONF_FFMPEG_ARGUMENTS] == "/H.264"
|
assert result["data"][CONF_FFMPEG_ARGUMENTS] == "/H.264"
|
||||||
assert result["data"][CONF_TIMEOUT] == 25
|
assert result["data"][CONF_TIMEOUT] == 25
|
||||||
|
|
||||||
assert len(mock_setup_entry.mock_calls) == 0
|
assert len(mock_setup_entry.mock_calls) == 1
|
||||||
|
|
||||||
|
|
||||||
async def test_user_form_exception(hass, ezviz_config_flow):
|
async def test_user_form_exception(hass, ezviz_config_flow):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user