Use http.HTTPStatus in components/s* (#58291)

This commit is contained in:
Ville Skyttä 2021-10-23 21:49:04 +03:00 committed by GitHub
parent 05671557f0
commit 50e0c58310
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 180 additions and 158 deletions

View file

@ -1,4 +1,5 @@
"""The tests for the SleepIQ component."""
from http import HTTPStatus
from unittest.mock import MagicMock, patch
from homeassistant import setup
@ -41,7 +42,7 @@ async def test_setup_login_failed(hass, requests_mock):
mock_responses(requests_mock)
requests_mock.put(
"https://prod-api.sleepiq.sleepnumber.com/rest/login",
status_code=401,
status_code=HTTPStatus.UNAUTHORIZED,
json=load_fixture("sleepiq-login-failed.json"),
)