From 194485d863a080478e8fa0e5b1fa857146c11711 Mon Sep 17 00:00:00 2001 From: Ariel Ebersberger <31776703+justanotherariel@users.noreply.github.com> Date: Mon, 30 Mar 2026 13:19:52 +0200 Subject: [PATCH] Fix shelly tests - mock async_unload_entry (#166851) --- tests/components/shelly/conftest.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/components/shelly/conftest.py b/tests/components/shelly/conftest.py index f3a583035e79..137d5dc9f3e0 100644 --- a/tests/components/shelly/conftest.py +++ b/tests/components/shelly/conftest.py @@ -793,10 +793,13 @@ async def mock_sleepy_rpc_device(): @pytest.fixture def mock_setup_entry() -> Generator[AsyncMock]: - """Override async_setup_entry.""" - with patch( - "homeassistant.components.shelly.async_setup_entry", return_value=True - ) as mock_setup_entry: + """Override async_setup_entry and async_unload_entry.""" + with ( + patch( + "homeassistant.components.shelly.async_setup_entry", return_value=True + ) as mock_setup_entry, + patch("homeassistant.components.shelly.async_unload_entry", return_value=True), + ): yield mock_setup_entry