Use http.HTTPStatus in util.aiohttp (#58456)
parent
339d041925
commit
b0e1bab58b
|
@ -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 = "",
|
||||
|
|
Loading…
Reference in New Issue