mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Make sure gardena bluetooth mock unload if it mocks load (#148920)
This commit is contained in:
parent
a0991134c4
commit
5383ff96ef
@ -29,8 +29,18 @@ def mock_entry():
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_setup_entry() -> Generator[AsyncMock]:
|
||||
@pytest.fixture(scope="module")
|
||||
def mock_unload_entry() -> Generator[AsyncMock]:
|
||||
"""Override async_unload_entry."""
|
||||
with patch(
|
||||
"homeassistant.components.gardena_bluetooth.async_unload_entry",
|
||||
return_value=True,
|
||||
) as mock_unload_entry:
|
||||
yield mock_unload_entry
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def mock_setup_entry(mock_unload_entry) -> Generator[AsyncMock]:
|
||||
"""Override async_setup_entry."""
|
||||
with patch(
|
||||
"homeassistant.components.gardena_bluetooth.async_setup_entry",
|
||||
|
Loading…
x
Reference in New Issue
Block a user