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

@ -1,4 +1,5 @@
"""Tests for config/script."""
from http import HTTPStatus
from unittest.mock import patch
from homeassistant.bootstrap import async_setup_component
@ -29,7 +30,7 @@ async def test_delete_script(hass, hass_client):
):
resp = await client.delete("/api/config/script/config/two")
assert resp.status == 200
assert resp.status == HTTPStatus.OK
result = await resp.json()
assert result == {"result": "ok"}