Adjust json imports in tests (#88248)

This commit is contained in:
epenet 2023-02-17 19:13:48 +01:00 committed by GitHub
parent b51836a57b
commit a16e298599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 12 deletions

View File

@ -25,9 +25,9 @@ from homeassistant.components.bluetooth.const import (
UNAVAILABLE_TRACK_SECONDS,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.json import json_loads
from homeassistant.setup import async_setup_component
import homeassistant.util.dt as dt_util
from homeassistant.util.json import json_loads
from . import MockBleakClient, _get_manager, generate_advertisement_data

View File

@ -28,9 +28,9 @@ from homeassistant.components.bluetooth.manager import (
FALLBACK_MAXIMUM_STALE_ADVERTISEMENT_SECONDS,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.json import json_loads
from homeassistant.setup import async_setup_component
from homeassistant.util import dt as dt_util
from homeassistant.util.json import json_loads
from . import (
FakeScanner,

View File

@ -8,7 +8,7 @@ from homeassistant.components.homekit.iidmanager import (
get_iid_storage_filename_for_entry_id,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.json import json_loads
from homeassistant.util.json import json_loads
from homeassistant.util.uuid import random_uuid_hex
from tests.common import MockConfigEntry, load_fixture

View File

@ -46,13 +46,9 @@ from homeassistant.const import (
MAX_LENGTH_STATE_STATE,
)
from homeassistant.core import Context, Event, EventOrigin, State, split_entity_id
from homeassistant.helpers.json import (
JSON_DECODE_EXCEPTIONS,
JSON_DUMP,
json_bytes,
json_loads,
)
from homeassistant.helpers.json import JSON_DUMP, json_bytes
import homeassistant.util.dt as dt_util
from homeassistant.util.json import JSON_DECODE_EXCEPTIONS, json_loads
ALL_DOMAIN_EXCLUDE_ATTRS = {ATTR_ATTRIBUTION, ATTR_RESTORED, ATTR_SUPPORTED_FEATURES}

View File

@ -19,9 +19,9 @@ from homeassistant.core import Context, HomeAssistant, State, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import entity
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.json import json_loads
from homeassistant.loader import async_get_integration
from homeassistant.setup import DATA_SETUP_TIME, async_setup_component
from homeassistant.util.json import json_loads
from tests.common import MockEntity, MockEntityPlatform, MockUser, async_mock_service
from tests.typing import ClientSessionGenerator, WebSocketGenerator

View File

@ -55,10 +55,10 @@ from homeassistant.helpers import (
issue_registry as ir,
recorder as recorder_helper,
)
from homeassistant.helpers.json import json_loads
from homeassistant.helpers.typing import ConfigType
from homeassistant.setup import async_setup_component
from homeassistant.util import dt as dt_util, location
from homeassistant.util.json import json_loads
from .ignore_uncaught_exceptions import IGNORE_UNCAUGHT_EXCEPTIONS
from .typing import (

View File

@ -13,7 +13,8 @@ from multidict import CIMultiDict
from yarl import URL
from homeassistant.const import EVENT_HOMEASSISTANT_CLOSE
from homeassistant.helpers.json import json_dumps, json_loads
from homeassistant.helpers.json import json_dumps
from homeassistant.util.json import json_loads
RETYPE = type(re.compile(""))