1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-18 16:06:42 +01:00

Mock TodoistAPIAsync in todoist failed coordinator update test (#164390)

This commit is contained in:
Franck Nijhof
2026-02-27 20:49:02 +01:00
committed by GitHub
parent 8835f1d5e6
commit c81ee53265

View File

@@ -183,6 +183,9 @@ async def test_failed_coordinator_update(hass: HomeAssistant, api: AsyncMock) ->
"""Test a failed data coordinator update is handled correctly."""
api.get_tasks.side_effect = Exception("API error")
with patch(
"homeassistant.components.todoist.calendar.TodoistAPIAsync", return_value=api
):
assert await setup.async_setup_component(
hass,
"calendar",