Use http.HTTPStatus in components/[gh]* (#58246)

This commit is contained in:
Ville Skyttä 2021-10-23 21:34:53 +03:00 committed by GitHub
parent 583ae3c953
commit b52c5c82b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 272 additions and 247 deletions

View file

@ -1,4 +1,5 @@
"""Tests for Home Assistant View."""
from http import HTTPStatus
from unittest.mock import AsyncMock, Mock
from aiohttp.web_exceptions import (
@ -68,4 +69,4 @@ async def test_not_running(mock_request_with_stopping):
response = await request_handler_factory(
Mock(requires_auth=False), AsyncMock(side_effect=Unauthorized)
)(mock_request_with_stopping)
assert response.status == 503
assert response.status == HTTPStatus.SERVICE_UNAVAILABLE