Use builtin TimeoutError [core + helpers] (#109684)
This commit is contained in:
parent
a9147cf3dd
commit
cd0ee98dba
19 changed files with 70 additions and 74 deletions
|
@ -1,5 +1,4 @@
|
|||
"""Test the aiohttp client helper."""
|
||||
import asyncio
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
import aiohttp
|
||||
|
@ -249,7 +248,7 @@ async def test_async_aiohttp_proxy_stream_timeout(
|
|||
aioclient_mock: AiohttpClientMocker, camera_client
|
||||
) -> None:
|
||||
"""Test that it fetches the given url."""
|
||||
aioclient_mock.get("http://example.com/mjpeg_stream", exc=asyncio.TimeoutError())
|
||||
aioclient_mock.get("http://example.com/mjpeg_stream", exc=TimeoutError())
|
||||
|
||||
resp = await camera_client.get("/api/camera_proxy_stream/camera.mjpeg_camera")
|
||||
assert resp.status == 504
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue