diff --git a/tests/components/tautulli/test_config_flow.py b/tests/components/tautulli/test_config_flow.py index 722fd0a7616..1b9f4e8e06f 100644 --- a/tests/components/tautulli/test_config_flow.py +++ b/tests/components/tautulli/test_config_flow.py @@ -25,12 +25,15 @@ async def test_flow_user(hass: HomeAssistant) -> None: assert result["step_id"] == "user" assert result["errors"] == {} - with patch_config_flow_tautulli(AsyncMock()): + with ( + patch_config_flow_tautulli(AsyncMock()), + patch("homeassistant.components.tautulli.async_setup_entry", return_value=True), + ): result2 = await hass.config_entries.flow.async_configure( result["flow_id"], user_input=CONF_DATA, ) - await hass.async_block_till_done() + await hass.async_block_till_done() assert result2["type"] is FlowResultType.CREATE_ENTRY assert result2["title"] == NAME @@ -48,12 +51,15 @@ async def test_flow_user_cannot_connect(hass: HomeAssistant) -> None: assert result["step_id"] == "user" assert result["errors"]["base"] == "cannot_connect" - with patch_config_flow_tautulli(AsyncMock()): + with ( + patch_config_flow_tautulli(AsyncMock()), + patch("homeassistant.components.tautulli.async_setup_entry", return_value=True), + ): result2 = await hass.config_entries.flow.async_configure( result["flow_id"], user_input=CONF_DATA, ) - await hass.async_block_till_done() + await hass.async_block_till_done() assert result2["type"] is FlowResultType.CREATE_ENTRY assert result2["title"] == NAME @@ -71,12 +77,15 @@ async def test_flow_user_invalid_auth(hass: HomeAssistant) -> None: assert result["step_id"] == "user" assert result["errors"]["base"] == "invalid_auth" - with patch_config_flow_tautulli(AsyncMock()): + with ( + patch_config_flow_tautulli(AsyncMock()), + patch("homeassistant.components.tautulli.async_setup_entry", return_value=True), + ): result2 = await hass.config_entries.flow.async_configure( result["flow_id"], user_input=CONF_DATA, ) - await hass.async_block_till_done() + await hass.async_block_till_done() assert result2["type"] is FlowResultType.CREATE_ENTRY assert result2["title"] == NAME @@ -94,12 +103,15 @@ async def test_flow_user_unknown_error(hass: HomeAssistant) -> None: assert result["step_id"] == "user" assert result["errors"]["base"] == "unknown" - with patch_config_flow_tautulli(AsyncMock()): + with ( + patch_config_flow_tautulli(AsyncMock()), + patch("homeassistant.components.tautulli.async_setup_entry", return_value=True), + ): result2 = await hass.config_entries.flow.async_configure( result["flow_id"], user_input=CONF_DATA, ) - await hass.async_block_till_done() + await hass.async_block_till_done() assert result2["type"] is FlowResultType.CREATE_ENTRY assert result2["title"] == NAME @@ -138,12 +150,15 @@ async def test_flow_user_multiple_entries_allowed(hass: HomeAssistant) -> None: CONF_API_KEY: "efgh", CONF_VERIFY_SSL: True, } - with patch_config_flow_tautulli(AsyncMock()): + with ( + patch_config_flow_tautulli(AsyncMock()), + patch("homeassistant.components.tautulli.async_setup_entry", return_value=True), + ): result2 = await hass.config_entries.flow.async_configure( result["flow_id"], user_input=user_input, ) - await hass.async_block_till_done() + await hass.async_block_till_done() assert result2["type"] is FlowResultType.CREATE_ENTRY assert result2["title"] == NAME