Fix shelly tests - mock async_unload_entry (#166851)

This commit is contained in:
Ariel Ebersberger
2026-03-30 13:19:52 +02:00
committed by GitHub
parent d6458bc574
commit 194485d863
+7 -4
View File
@@ -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