diff --git a/tests/components/dunehd/test_config_flow.py b/tests/components/dunehd/test_config_flow.py index c8e7b0f7f3e..73732236077 100644 --- a/tests/components/dunehd/test_config_flow.py +++ b/tests/components/dunehd/test_config_flow.py @@ -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},