Switch to orjson for tests (#84674)

This commit is contained in:
Joakim Plate 2022-12-28 03:36:58 +01:00 committed by GitHub
parent 94d1375be3
commit 94a02e7613
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ from contextlib import asynccontextmanager
import functools import functools
import gc import gc
import itertools import itertools
from json import JSONDecoder, loads from json import JSONDecoder
import logging import logging
import sqlite3 import sqlite3
import ssl import ssl
@ -45,6 +45,7 @@ from homeassistant.components.websocket_api.http import URL
from homeassistant.const import HASSIO_USER_NAME from homeassistant.const import HASSIO_USER_NAME
from homeassistant.core import CoreState, HomeAssistant from homeassistant.core import CoreState, HomeAssistant
from homeassistant.helpers import config_entry_oauth2_flow, recorder as recorder_helper from homeassistant.helpers import config_entry_oauth2_flow, recorder as recorder_helper
from homeassistant.helpers.json import json_loads
from homeassistant.helpers.typing import ConfigType from homeassistant.helpers.typing import ConfigType
from homeassistant.setup import async_setup_component from homeassistant.setup import async_setup_component
from homeassistant.util import dt as dt_util, location from homeassistant.util import dt as dt_util, location
@ -271,7 +272,7 @@ class CoalescingResponse(client.ClientWebSocketResponse):
async def receive_json( async def receive_json(
self, self,
*, *,
loads: JSONDecoder = loads, loads: JSONDecoder = json_loads,
timeout: float | None = None, timeout: float | None = None,
) -> Any: ) -> Any:
"""receive_json or from buffer.""" """receive_json or from buffer."""