From b0e1bab58b6c4d662a4b3ed88554180db645e1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 26 Oct 2021 14:13:27 +0300 Subject: [PATCH] Use http.HTTPStatus in util.aiohttp (#58456) --- homeassistant/util/aiohttp.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/util/aiohttp.py b/homeassistant/util/aiohttp.py index 7d14ec252d9..b23e5cf29e8 100644 --- a/homeassistant/util/aiohttp.py +++ b/homeassistant/util/aiohttp.py @@ -1,6 +1,7 @@ """Utilities to help with aiohttp.""" from __future__ import annotations +from http import HTTPStatus import io import json from typing import Any @@ -8,8 +9,6 @@ from urllib.parse import parse_qsl from multidict import CIMultiDict, MultiDict -from homeassistant.const import HTTP_OK - class MockStreamReader: """Small mock to imitate stream reader.""" @@ -35,7 +34,7 @@ class MockRequest: content: bytes, mock_source: str, method: str = "GET", - status: int = HTTP_OK, + status: int = HTTPStatus.OK, headers: dict[str, str] | None = None, query_string: str | None = None, url: str = "",