Use builtin TimeoutError [a-d] (#109678)

This commit is contained in:
Marc Mueller 2024-02-05 11:31:33 +01:00 committed by GitHub
parent 41a256a3ff
commit c82933175d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
63 changed files with 97 additions and 137 deletions

View file

@ -1,5 +1,4 @@
"""The tests for the analytics ."""
import asyncio
from typing import Any
from unittest.mock import ANY, AsyncMock, Mock, PropertyMock, patch
@ -756,7 +755,7 @@ async def test_timeout_while_sending(
) -> None:
"""Test timeout error while sending analytics."""
analytics = Analytics(hass)
aioclient_mock.post(ANALYTICS_ENDPOINT_URL_DEV, exc=asyncio.TimeoutError())
aioclient_mock.post(ANALYTICS_ENDPOINT_URL_DEV, exc=TimeoutError())
await analytics.save_preferences({ATTR_BASE: True})
with patch(