Use http.HTTPStatus in util.aiohttp (#58456)

pull/58472/head
Ville Skyttä 2021-10-26 14:13:27 +03:00 committed by GitHub
parent 339d041925
commit b0e1bab58b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -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 = "",