diff --git a/tests/components/shelly/conftest.py b/tests/components/shelly/conftest.py index f3a583035e791c..137d5dc9f3e06e 100644 --- a/tests/components/shelly/conftest.py +++ b/tests/components/shelly/conftest.py @@ -793,10 +793,13 @@ def _initialize(): @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