Use http.HTTPStatus in components/[gh]* (#58246)
This commit is contained in:
parent
583ae3c953
commit
b52c5c82b1
38 changed files with 272 additions and 247 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue