Bump to aiohttp 3.8.0 (#58974)

This commit is contained in:
J. Nick Koston 2021-11-04 10:07:50 -05:00 committed by GitHub
parent 23cb396aad
commit 10d6247fee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
106 changed files with 221 additions and 142 deletions

View file

@ -3,7 +3,9 @@ import asyncio
from http import HTTPStatus
from unittest.mock import patch
import aiohttp
import httpx
import pytest
import respx
from homeassistant import config as hass_config
@ -132,10 +134,13 @@ async def test_limit_refetch(hass, hass_client):
hass.states.async_set("sensor.temp", "5")
with patch("async_timeout.timeout", side_effect=asyncio.TimeoutError()):
with pytest.raises(aiohttp.ServerTimeoutError), patch(
"async_timeout.timeout", side_effect=asyncio.TimeoutError()
):
resp = await client.get("/api/camera_proxy/camera.config_test")
assert respx.calls.call_count == 0
assert resp.status == HTTPStatus.INTERNAL_SERVER_ERROR
assert respx.calls.call_count == 0
assert resp.status == HTTPStatus.INTERNAL_SERVER_ERROR
hass.states.async_set("sensor.temp", "10")