Bump aiohttp to 3.9.1 (#104176)
This commit is contained in:
parent
ba481001c3
commit
608f4f7c52
8 changed files with 18 additions and 37 deletions
|
@ -1,7 +1,6 @@
|
|||
"""The tests for generic camera component."""
|
||||
import asyncio
|
||||
from http import HTTPStatus
|
||||
import sys
|
||||
from unittest.mock import patch
|
||||
|
||||
import aiohttp
|
||||
|
@ -164,17 +163,10 @@ async def test_limit_refetch(
|
|||
|
||||
hass.states.async_set("sensor.temp", "5")
|
||||
|
||||
# TODO: Remove version check with aiohttp 3.9.0
|
||||
if sys.version_info >= (3, 12):
|
||||
with pytest.raises(aiohttp.ServerTimeoutError), patch(
|
||||
"asyncio.timeout", side_effect=asyncio.TimeoutError()
|
||||
):
|
||||
resp = await client.get("/api/camera_proxy/camera.config_test")
|
||||
else:
|
||||
with pytest.raises(aiohttp.ServerTimeoutError), patch(
|
||||
"async_timeout.timeout", side_effect=asyncio.TimeoutError()
|
||||
):
|
||||
resp = await client.get("/api/camera_proxy/camera.config_test")
|
||||
with pytest.raises(aiohttp.ServerTimeoutError), patch(
|
||||
"asyncio.timeout", side_effect=asyncio.TimeoutError()
|
||||
):
|
||||
resp = await client.get("/api/camera_proxy/camera.config_test")
|
||||
|
||||
assert respx.calls.call_count == 1
|
||||
assert resp.status == HTTPStatus.OK
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue