From 9ec22ba158b26ad1b9fb7560d9910234dbd86fce Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 27 Feb 2026 20:26:18 +0100 Subject: [PATCH] Mock async_setup_entry in kostal_plenticore reconfigure test (#164372) --- .../kostal_plenticore/test_config_flow.py | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/components/kostal_plenticore/test_config_flow.py b/tests/components/kostal_plenticore/test_config_flow.py index b4e7ffc0695f..3f39cf16f13c 100644 --- a/tests/components/kostal_plenticore/test_config_flow.py +++ b/tests/components/kostal_plenticore/test_config_flow.py @@ -400,14 +400,18 @@ async def test_reconfigure( return_value={"scb:network": {"Hostname": "scb"}} ) - result = await hass.config_entries.flow.async_configure( - result["flow_id"], - { - "host": "1.1.1.1", - "password": "test-password", - }, - ) - await hass.async_block_till_done() + with patch( + "homeassistant.components.kostal_plenticore.async_setup_entry", + return_value=True, + ): + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + { + "host": "1.1.1.1", + "password": "test-password", + }, + ) + await hass.async_block_till_done() mock_apiclient_class.assert_called_once_with(ANY, "1.1.1.1") mock_apiclient.__aenter__.assert_called_once()