1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Replace mock_coro with AsyncMock (#99014)

* Replace mock_coro with AsyncMock

* Remove mock_coro test helper function

* Remove redundant AsyncMock
This commit is contained in:
Marc Mueller
2023-08-25 22:54:55 +02:00
committed by GitHub
parent 57144a6064
commit 544d6b05a5
18 changed files with 43 additions and 60 deletions

View File

@@ -6,7 +6,7 @@ from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
from tests.common import MockConfigEntry, mock_coro
from tests.common import MockConfigEntry
async def test_setup_with_cloud_config(hass: HomeAssistant) -> None:
@@ -109,7 +109,9 @@ async def test_unload_entry(hass: HomeAssistant) -> None:
entry.add_to_hass(hass)
with patch.object(
hass.config_entries, "async_forward_entry_unload", return_value=mock_coro(True)
hass.config_entries,
"async_forward_entry_unload",
return_value=True,
) as unload_entry, patch(
"mill.Mill.fetch_heater_and_sensor_data", return_value={}
), patch(