From 44b80dde0c8ecc05616f2f372dc4b6f66901182e Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 27 Feb 2026 20:33:19 +0100 Subject: [PATCH] Mock async_setup_entry in radarr config flow tests (#164359) --- tests/components/radarr/test_config_flow.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/components/radarr/test_config_flow.py b/tests/components/radarr/test_config_flow.py index 096c78e1c4a6..02f9493a32c7 100644 --- a/tests/components/radarr/test_config_flow.py +++ b/tests/components/radarr/test_config_flow.py @@ -122,9 +122,12 @@ async def test_unknown_error(hass: HomeAssistant) -> None: async def test_zero_conf(hass: HomeAssistant) -> None: """Test the manual flow for zero config.""" - with patch( - "homeassistant.components.radarr.config_flow.RadarrClient.async_try_zeroconf", - return_value=("v3", API_KEY, "/test"), + with ( + patch( + "homeassistant.components.radarr.config_flow.RadarrClient.async_try_zeroconf", + return_value=("v3", API_KEY, "/test"), + ), + patch_async_setup_entry(), ): result = await hass.config_entries.flow.async_init( DOMAIN, @@ -139,9 +142,12 @@ async def test_zero_conf(hass: HomeAssistant) -> None: async def test_url_rewrite(hass: HomeAssistant) -> None: """Test auth flow url rewrite.""" - with patch( - "homeassistant.components.radarr.config_flow.RadarrClient.async_try_zeroconf", - return_value=("v3", API_KEY, "/test"), + with ( + patch( + "homeassistant.components.radarr.config_flow.RadarrClient.async_try_zeroconf", + return_value=("v3", API_KEY, "/test"), + ), + patch_async_setup_entry(), ): result = await hass.config_entries.flow.async_init( DOMAIN,