mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Fix slow config_flow test in Dune HD (#60366)
This commit is contained in:
parent
de78c4f0f8
commit
ba7b5681e6
@ -16,7 +16,9 @@ DUNEHD_STATE = {"protocol_version": "4", "player_state": "navigator"}
|
||||
|
||||
async def test_import(hass):
|
||||
"""Test that the import works."""
|
||||
with patch("pdunehd.DuneHDPlayer.update_state", return_value=DUNEHD_STATE):
|
||||
with patch("homeassistant.components.dunehd.async_setup_entry"), patch(
|
||||
"pdunehd.DuneHDPlayer.update_state", return_value=DUNEHD_STATE
|
||||
):
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": SOURCE_IMPORT}, data=CONFIG_HOSTNAME
|
||||
)
|
||||
@ -108,7 +110,9 @@ async def test_duplicate_error(hass):
|
||||
|
||||
async def test_create_entry(hass):
|
||||
"""Test that the user step works."""
|
||||
with patch("pdunehd.DuneHDPlayer.update_state", return_value=DUNEHD_STATE):
|
||||
with patch("homeassistant.components.dunehd.async_setup_entry"), patch(
|
||||
"pdunehd.DuneHDPlayer.update_state", return_value=DUNEHD_STATE
|
||||
):
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": SOURCE_USER}, data=CONFIG_HOSTNAME
|
||||
)
|
||||
@ -120,7 +124,9 @@ async def test_create_entry(hass):
|
||||
|
||||
async def test_create_entry_with_ipv6_address(hass):
|
||||
"""Test that the user step works with device IPv6 address.."""
|
||||
with patch("pdunehd.DuneHDPlayer.update_state", return_value=DUNEHD_STATE):
|
||||
with patch("homeassistant.components.dunehd.async_setup_entry"), patch(
|
||||
"pdunehd.DuneHDPlayer.update_state", return_value=DUNEHD_STATE
|
||||
):
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={"source": SOURCE_USER},
|
||||
|
Loading…
x
Reference in New Issue
Block a user