mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 07:25:52 -05:00
Fix shelly tests - mock async_unload_entry (#166851)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user