Bump aiohttp to 3.9.1 (#104176)

This commit is contained in:
J. Nick Koston 2023-11-29 09:13:54 -06:00 committed by GitHub
parent ba481001c3
commit 608f4f7c52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 37 deletions

View file

@ -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