From 5b7fac94e5a0b54ba17e08cfa53ae203442d7285 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 27 Feb 2026 20:42:02 +0100 Subject: [PATCH] Mock async_setup_entry in ccm15 config flow tests (#164352) --- tests/components/ccm15/test_config_flow.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/components/ccm15/test_config_flow.py b/tests/components/ccm15/test_config_flow.py index 01da32828857..3171d4006cbe 100644 --- a/tests/components/ccm15/test_config_flow.py +++ b/tests/components/ccm15/test_config_flow.py @@ -79,7 +79,9 @@ async def test_form_invalid_host( assert result2["type"] is FlowResultType.CREATE_ENTRY -async def test_form_cannot_connect(hass: HomeAssistant) -> None: +async def test_form_cannot_connect( + hass: HomeAssistant, mock_setup_entry: AsyncMock +) -> None: """Test we handle cannot connect error.""" result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": config_entries.SOURCE_USER} @@ -111,7 +113,9 @@ async def test_form_cannot_connect(hass: HomeAssistant) -> None: assert result2["type"] is FlowResultType.CREATE_ENTRY -async def test_form_unexpected_error(hass: HomeAssistant) -> None: +async def test_form_unexpected_error( + hass: HomeAssistant, mock_setup_entry: AsyncMock +) -> None: """Test we handle cannot connect error.""" result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": config_entries.SOURCE_USER}