Use HTTPStatus instead of HTTP_ consts and magic values in comp.../[bc]* (#57989)

This commit is contained in:
Ville Skyttä 2021-10-22 20:43:40 +03:00 committed by GitHub
parent ab7a34fc71
commit 73d192b3f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 169 additions and 182 deletions

View file

@ -56,7 +56,7 @@ async def test_fetching_url_and_caching(aioclient_mock, hass, hass_client):
resp = await client.get("/api/camera_proxy/camera.buienradar_51_5288505_400216")
assert resp.status == 200
assert resp.status == HTTPStatus.OK
assert aioclient_mock.call_count == 1
body = await resp.text()
assert body == "hello world"
@ -86,7 +86,7 @@ async def test_expire_delta(aioclient_mock, hass, hass_client):
resp = await client.get("/api/camera_proxy/camera.buienradar_51_5288505_400216")
assert resp.status == 200
assert resp.status == HTTPStatus.OK
assert aioclient_mock.call_count == 1
body = await resp.text()
assert body == "hello world"