From f0297e229c5b2b4991bd7c610a430957da2ed932 Mon Sep 17 00:00:00 2001 From: raman325 <7243222+raman325@users.noreply.github.com> Date: Thu, 26 Nov 2026 14:16:01 -0500 Subject: [PATCH] feat!: require Home Assistant 2026.11 and test with core's pytest-homeassistant pytest-homeassistant-custom-component is deprecated and frozen at Home Assistant 2026.10.4, so no 2026.11 bump could resolve against it. Tests now use core's pytest-homeassistant, pinned to the Home Assistant version under test, with the integration requirements it no longer brings in. Home Assistant 2026.11 changes the config entry contract: setup, migrate and unload return None and raise on failure, and 2026.10 rejects None, so the minimum version moves to 2026.11.0. It also removes a deleted subentry's entities before notifying the entry, which made a code slot subscription send an all-empty payload for a deleted user; the removal check now reads the entry's subentries. CONN_CLASS_* is deprecated with no replacement and is dropped, and the deprecation detector follows Home Assistant's reworded messages. Co-Authored-By: Claude Opus 5.5 Entire-Checkpoint: f9618439d905 --- .github/dependabot.yaml | 18 +++++++++++------ AGENTS.md | 3 ++- .../lock_code_manager/__init__.py | 19 ++++++++++-------- .../lock_code_manager/config_flow.py | 1 - .../lock_code_manager/websocket.py | 6 +++++- hacs.json | 2 +- requirements_dev.txt | 13 +++++++++--- requirements_test.txt | 2 +- tests/common.py | 13 ++++++------ tests/conftest.py | 20 ++++++++++++++----- tests/properties/test_manages_predicates.py | 2 +- tests/properties/test_shared_lock_machine.py | 2 +- .../properties/test_validation_properties.py | 2 +- tests/providers/akuvox/conftest.py | 2 +- tests/providers/akuvox/test_e2e.py | 2 +- tests/providers/akuvox/test_provider.py | 2 +- tests/providers/helpers.py | 2 +- tests/providers/matter/conftest.py | 2 +- tests/providers/matter/helpers.py | 2 +- tests/providers/matter/test_e2e.py | 2 +- tests/providers/matter/test_node_harness.py | 2 +- tests/providers/matter/test_provider.py | 2 +- tests/providers/schlage/conftest.py | 2 +- tests/providers/schlage/test_e2e.py | 2 +- tests/providers/schlage/test_provider.py | 2 +- tests/providers/test_base.py | 2 +- tests/providers/test_dispatch.py | 2 +- tests/providers/test_seam.py | 2 +- tests/providers/virtual/conftest.py | 2 +- tests/providers/virtual/test_e2e.py | 2 +- tests/providers/zha/conftest.py | 2 +- tests/providers/zha/test_e2e.py | 2 +- tests/providers/zha/test_provider.py | 2 +- tests/providers/zigbee2mqtt/conftest.py | 2 +- tests/providers/zigbee2mqtt/fake_bridge.py | 2 +- tests/providers/zigbee2mqtt/test_e2e.py | 2 +- tests/providers/zigbee2mqtt/test_payload.py | 2 +- tests/providers/zwave_js/conftest.py | 2 +- tests/providers/zwave_js/test_e2e.py | 2 +- tests/providers/zwave_js/test_events.py | 2 +- tests/providers/zwave_js/test_node_harness.py | 2 +- tests/providers/zwave_js/test_provider.py | 2 +- tests/providers/zwave_js_ui/conftest.py | 2 +- tests/providers/zwave_js_ui/test_api.py | 2 +- tests/providers/zwave_js_ui/test_borrowed.py | 2 +- tests/providers/zwave_js_ui/test_e2e.py | 2 +- tests/providers/zwave_js_ui/test_push.py | 2 +- tests/test_adapter.py | 2 +- tests/test_binary_sensor.py | 2 +- tests/test_blueprint_behavior.py | 2 +- tests/test_config.py | 2 +- tests/test_config_flow.py | 2 +- tests/test_event.py | 2 +- tests/test_exceptions.py | 2 +- tests/test_harness.py | 2 +- tests/test_init.py | 4 ++-- tests/test_lock_runtime.py | 2 +- tests/test_lock_store.py | 2 +- tests/test_lockless_entries.py | 2 +- tests/test_locks.py | 2 +- tests/test_logbook.py | 2 +- tests/test_migration_history.py | 4 ++-- tests/test_open_bugs.py | 2 +- tests/test_pin_logging.py | 2 +- tests/test_pin_masking.py | 2 +- tests/test_queries.py | 2 +- tests/test_repairs_references.py | 2 +- tests/test_sensor.py | 2 +- tests/test_services.py | 2 +- tests/test_slot_coordinator.py | 2 +- tests/test_switch.py | 2 +- tests/test_text.py | 2 +- tests/test_unmanaged_codes.py | 6 +++--- tests/test_validation.py | 2 +- tests/test_websocket.py | 4 ++-- 75 files changed, 133 insertions(+), 104 deletions(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 6805dc789..3915ddbd6 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -23,10 +23,10 @@ updates: - "dependencies" - "python" ignore: - # pytest-homeassistant-custom-component pins pytest EXACTLY, because it - # carries the whole of HA core's test requirements. Raising our floor past - # that pin cannot resolve, however long the pull request stays open, so - # the only move is to let phacc bring pytest forward on its own schedule. + # pytest-homeassistant pins pytest EXACTLY, because it carries HA core's + # test requirements. Raising our floor past that pin cannot resolve, + # however long the pull request stays open, so the only move is to let + # pytest-homeassistant bring pytest forward on its own schedule. - dependency-name: pytest groups: # HA pins these exactly (directly or via integration manifests), so they @@ -34,19 +34,25 @@ updates: homeassistant: patterns: - "homeassistant" - - "pytest-homeassistant-custom-component" + - "pytest-homeassistant" - "aioesphomeapi" - "aiofiles" + - "aiohasupervisor" - "aiousbwatcher" + - "av" - "colorlog" - "debugpy" + - "fnv-hash-fast" - "ha-silabs-firmware-client" - "matter-python-client" + - "numpy" + - "psutil-home-assistant" - "pyserial" + - "PyTurboJPEG" - "pyudev" + - "SQLAlchemy" - "universal-silabs-flasher" - "usb-devices" - - "zeroconf" - "zha" - "zha-quirks" - "zwave-js-server-python" diff --git a/AGENTS.md b/AGENTS.md index 54a09ff8b..73111ff45 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -337,7 +337,8 @@ If you test with stale JavaScript, the Lovelace strategy will fail with: ## Testing Notes -- Uses `pytest-homeassistant-custom-component` for HA test utilities +- Uses Home Assistant's `pytest-homeassistant` for HA test utilities (import from + `pytest_homeassistant.common`; pin it to the same version as `homeassistant`) - `tests/conftest.py`: Shared fixtures (`mock_lock_config_entry`, `lock_code_manager_config_entry`) - `tests/common.py`: `MockLCMLock` (in-memory provider), mock entities, test constants - Fault knobs on `MockLCMLock` (`ignore`, `refuse`, `fail`, `hang`, `drop_reply`, `slow`), diff --git a/custom_components/lock_code_manager/__init__.py b/custom_components/lock_code_manager/__init__.py index 0458a47e6..7cc2e0b8c 100644 --- a/custom_components/lock_code_manager/__init__.py +++ b/custom_components/lock_code_manager/__init__.py @@ -33,6 +33,7 @@ EVENT_LOVELACE_UPDATED, ) from homeassistant.core import ( + DOMAIN as HOMEASSISTANT_DOMAIN, CoreState, Event, HomeAssistant, @@ -237,7 +238,7 @@ def _entry_schema(fields: dict[Any, Any]) -> vol.Schema: async def async_migrate_entry( hass: HomeAssistant, config_entry: LockCodeManagerConfigEntry -) -> bool: +) -> None: """Migrate old entry data to new format.""" # The unmanaged-code sweep runs against the finished entry, at the bottom, # not from the step that introduced it: it asks every entry what it @@ -497,8 +498,6 @@ async def async_migrate_entry( # configuration users will actually have. await async_sweep_unmanaged_codes(hass, config_entry) - return True - @callback def _async_notify_lovelace_dashboards(hass: HomeAssistant) -> None: @@ -1000,7 +999,7 @@ def _clear_post_start_setup() -> None: async def async_setup_entry( hass: HomeAssistant, config_entry: LockCodeManagerConfigEntry -) -> bool: +) -> None: """Set up a config entry.""" ent_reg = er.async_get(hass) try: @@ -1053,8 +1052,6 @@ def _safe_unsub() -> None: config_entry.async_on_unload(_safe_unsub) - return True - async def async_unload_lock( hass: HomeAssistant, @@ -1148,7 +1145,7 @@ async def _async_release_locks( async def async_unload_entry( hass: HomeAssistant, config_entry: LockCodeManagerConfigEntry -) -> bool: +) -> None: """Unload an entry, stopping its slots before tearing down platforms.""" hass_data = hass.data[DATA] runtime_data = config_entry.runtime_data @@ -1198,7 +1195,13 @@ async def async_unload_entry( if not other_loaded_entries: await _async_cleanup_strategy_resource(hass, hass_data) - return unload_ok + # Raised last rather than through async_unload_platforms_or_raise, so a + # failed platform unload still releases the strategy resource above. + if not unload_ok: + raise ConfigEntryError( + translation_domain=HOMEASSISTANT_DOMAIN, + translation_key="unload_platforms_failed", + ) async def async_remove_entry( diff --git a/custom_components/lock_code_manager/config_flow.py b/custom_components/lock_code_manager/config_flow.py index c594008ab..209e0909f 100644 --- a/custom_components/lock_code_manager/config_flow.py +++ b/custom_components/lock_code_manager/config_flow.py @@ -703,7 +703,6 @@ class LockCodeManagerFlowHandler( """Config flow for Lock Code Manager.""" VERSION = 5 - CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL def __init__(self) -> None: """Initialize config flow.""" diff --git a/custom_components/lock_code_manager/websocket.py b/custom_components/lock_code_manager/websocket.py index bc5286a2b..6e8100075 100644 --- a/custom_components/lock_code_manager/websocket.py +++ b/custom_components/lock_code_manager/websocket.py @@ -113,6 +113,7 @@ get_entry_config, get_loaded_config_entry, slots_configured_on, + subentry_id_for_slot, ) from .providers import BaseLock @@ -1088,7 +1089,10 @@ def _send_update(next_event: dict[str, Any] | None = None) -> None: # which a card cannot tell apart from "entities not created yet" # during setup. So it would keep rendering the departed person, tinted # active, named "Unnamed". - if not get_entry_config(config_entry).has_slot(slot_num): + # Read from the entry's subentries, not the cached config: Home + # Assistant removes a deleted subentry's entities before the update + # listener refreshes that cache, and those removals land here. + if subentry_id_for_slot(config_entry, slot_num) is None: connection.send_event( msg["id"], {ATTR_SLOT_NUM: slot_num, ATTR_REMOVED: True} ) diff --git a/hacs.json b/hacs.json index 2f879df01..eb4131671 100644 --- a/hacs.json +++ b/hacs.json @@ -2,6 +2,6 @@ "name": "Lock Code Manager", "zip_release": true, "filename": "lock_code_manager.zip", - "homeassistant": "2026.10.0", + "homeassistant": "2026.11.0", "render_readme": true } diff --git a/requirements_dev.txt b/requirements_dev.txt index 4eecb5d82..100021755 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -2,17 +2,24 @@ -r requirements_test.txt aioesphomeapi==46.25.1 aiofiles==25.1.0 +aiohasupervisor==0.8.1 aiousbwatcher==1.1.2 +av==19.0.0 colorlog==6.12.0 debugpy==1.8.22 +fnv-hash-fast==2.0.3 ha-silabs-firmware-client==0.4.0 -homeassistant>=2026.10.4 +homeassistant>=2026.11.3 matter-python-client==1.5.5 +numpy==2.3.2 +psutil-home-assistant==0.0.1 pyserial==3.5 +PyTurboJPEG==1.8.3 pyudev==0.24.5 +SQLAlchemy==2.0.54 universal-silabs-flasher==1.3.0 usb-devices>=0.5.1 uv -zha==2.4.2 -zha-quirks==2.4.0 +zha==2.4.3 +zha-quirks==2.4.1 zwave-js-server-python==0.74.0 diff --git a/requirements_test.txt b/requirements_test.txt index b7109d852..026440394 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,7 +1,7 @@ hypothesis>=6.170.17 pylint-strict-informational>=0.1 pytest>=9.0.3 -pytest-homeassistant-custom-component==0.13.375 +pytest-homeassistant==2026.11.3 # Declared directly rather than leaned on transitively: `timeout` in # pyproject.toml degrades to a warning if this goes missing, so the # protection would vanish silently. diff --git a/tests/common.py b/tests/common.py index b845048be..2ed844429 100644 --- a/tests/common.py +++ b/tests/common.py @@ -26,7 +26,7 @@ import freezegun.api from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, MockModule, MockPlatform, @@ -1772,20 +1772,19 @@ async def async_setup_mock_lock_entry(hass: HomeAssistant) -> MockConfigEntry: async def async_setup_entry_init( hass: HomeAssistant, config_entry: ConfigEntry - ) -> bool: + ) -> None: """Set up test config entry.""" await hass.config_entries.async_forward_entry_setups( config_entry, [Platform.CALENDAR, Platform.LOCK] ) - return True async def async_unload_entry_init( hass: HomeAssistant, config_entry: ConfigEntry - ) -> bool: + ) -> None: """Unload test config entry.""" - for platform in (Platform.CALENDAR, Platform.LOCK): - await hass.config_entries.async_forward_entry_unload(config_entry, platform) - return True + await hass.config_entries.async_unload_platforms_or_raise( + config_entry, [Platform.CALENDAR, Platform.LOCK] + ) mock_platform(hass, f"{LOCK_DEVICE_DOMAIN}.config_flow") mock_integration( diff --git a/tests/conftest.py b/tests/conftest.py index fac26af2f..e0ceae30d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -12,7 +12,7 @@ from hypothesis import settings as hypothesis_settings from probatio import to_field_list import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_fire_time_changed, mock_config_flow, @@ -45,8 +45,6 @@ release_all_faults, ) -pytest_plugins = ["pytest_homeassistant_custom_component"] - # Hypothesis profiles: "dev" keeps the full-suite run within its # seconds budget; CI opts into deeper exploration via HYPOTHESIS_PROFILE=ci. # deadline=None in both: per-example deadlines flake under the HA test @@ -103,6 +101,18 @@ def auto_enable_custom_integrations(enable_custom_integrations): yield +@pytest.fixture +def hass_config_dir(hass_tmp_config_dir: str) -> str: + """ + Give each test its own temporary config directory. + + pytest-homeassistant otherwise shares ``tests/testing_config``, and Home + Assistant writes its default blueprints there, into the repository and + across parallel workers. + """ + return hass_tmp_config_dir + + @pytest.fixture(autouse=True) def auto_setup_mock_lock(): """Automatically set up MockLCMLock for all tests.""" @@ -180,8 +190,8 @@ async def _converted(self, *args: Any, **kwargs: Any) -> FlowResult: # the integration. DEPRECATED_USE_FORMATS = frozenset( { - "The deprecated %s %s was %s from %s.%s Use %s instead, please %s", - "The deprecated %s %s was %s from %s.%s Use %s instead", + "The deprecated %s %s was %s from %s.%s%s%s %s", + "The deprecated %s %s was %s from %s.%s%s", } ) diff --git a/tests/properties/test_manages_predicates.py b/tests/properties/test_manages_predicates.py index 79c92052d..6a5e63cc5 100644 --- a/tests/properties/test_manages_predicates.py +++ b/tests/properties/test_manages_predicates.py @@ -27,7 +27,7 @@ from typing import Any from hypothesis import given, strategies as st -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_test_home_assistant, ) diff --git a/tests/properties/test_shared_lock_machine.py b/tests/properties/test_shared_lock_machine.py index ae1ee1a7b..444a15c29 100644 --- a/tests/properties/test_shared_lock_machine.py +++ b/tests/properties/test_shared_lock_machine.py @@ -69,7 +69,7 @@ rule, ) import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( INSTANCES, MockConfigEntry, async_test_home_assistant, diff --git a/tests/properties/test_validation_properties.py b/tests/properties/test_validation_properties.py index 740a0ee9e..45df99319 100644 --- a/tests/properties/test_validation_properties.py +++ b/tests/properties/test_validation_properties.py @@ -15,7 +15,7 @@ import asyncio from hypothesis import given, strategies as st -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_test_home_assistant, ) diff --git a/tests/providers/akuvox/conftest.py b/tests/providers/akuvox/conftest.py index 687460671..b4d2bf7e4 100644 --- a/tests/providers/akuvox/conftest.py +++ b/tests/providers/akuvox/conftest.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.config_entries import ConfigEntryState from homeassistant.const import ( diff --git a/tests/providers/akuvox/test_e2e.py b/tests/providers/akuvox/test_e2e.py index d2fc96147..f48fbccef 100644 --- a/tests/providers/akuvox/test_e2e.py +++ b/tests/providers/akuvox/test_e2e.py @@ -5,7 +5,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.const import ( ATTR_ENTITY_ID, diff --git a/tests/providers/akuvox/test_provider.py b/tests/providers/akuvox/test_provider.py index 1356f3566..3c8d8accb 100644 --- a/tests/providers/akuvox/test_provider.py +++ b/tests/providers/akuvox/test_provider.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock, patch import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError diff --git a/tests/providers/helpers.py b/tests/providers/helpers.py index 2ba5e43e0..50a0e3295 100644 --- a/tests/providers/helpers.py +++ b/tests/providers/helpers.py @@ -20,7 +20,7 @@ from unittest.mock import AsyncMock, MagicMock import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.config_entries import ConfigEntryState from homeassistant.core import HomeAssistant, SupportsResponse diff --git a/tests/providers/matter/conftest.py b/tests/providers/matter/conftest.py index 54a03eedd..a41e6f523 100644 --- a/tests/providers/matter/conftest.py +++ b/tests/providers/matter/conftest.py @@ -10,7 +10,7 @@ from matter_server.common.const import SCHEMA_VERSION from matter_server.common.models import ServerInfoMessage import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.components.matter.const import CREDENTIAL_TYPE_REVERSE_MAP from homeassistant.const import ( diff --git a/tests/providers/matter/helpers.py b/tests/providers/matter/helpers.py index f588e837a..4a9399a6e 100644 --- a/tests/providers/matter/helpers.py +++ b/tests/providers/matter/helpers.py @@ -7,7 +7,7 @@ from matter_server.client.models.node import MatterNode from matter_server.common.helpers.util import dataclass_from_dict from matter_server.common.models import MatterNodeData -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.core import HomeAssistant diff --git a/tests/providers/matter/test_e2e.py b/tests/providers/matter/test_e2e.py index 32bedeed7..399037c00 100644 --- a/tests/providers/matter/test_e2e.py +++ b/tests/providers/matter/test_e2e.py @@ -11,7 +11,7 @@ from matter_server.client.models.node import MatterNode from matter_server.common.models import EventType, MatterNodeEvent import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_capture_events, ) diff --git a/tests/providers/matter/test_node_harness.py b/tests/providers/matter/test_node_harness.py index 5a36d5c21..d41b1dc7c 100644 --- a/tests/providers/matter/test_node_harness.py +++ b/tests/providers/matter/test_node_harness.py @@ -15,7 +15,7 @@ from matter_server.common.errors import NodeNotResolving, UnknownError from matter_server.common.models import EventType import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.components.matter import lock_helpers from homeassistant.const import STATE_ON diff --git a/tests/providers/matter/test_provider.py b/tests/providers/matter/test_provider.py index f200fb8a5..adcacb488 100644 --- a/tests/providers/matter/test_provider.py +++ b/tests/providers/matter/test_provider.py @@ -13,7 +13,7 @@ from matter_server.common.errors import UnknownError from matter_server.common.models import EventType, MatterNodeEvent import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.components.matter.helpers import get_node_from_device_entry from homeassistant.config_entries import ConfigEntryState diff --git a/tests/providers/schlage/conftest.py b/tests/providers/schlage/conftest.py index e665cf9da..813424472 100644 --- a/tests/providers/schlage/conftest.py +++ b/tests/providers/schlage/conftest.py @@ -3,7 +3,7 @@ from unittest.mock import AsyncMock, patch import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.const import ( CONF_ENABLED, diff --git a/tests/providers/schlage/test_e2e.py b/tests/providers/schlage/test_e2e.py index 80b1d7350..5b5fba23c 100644 --- a/tests/providers/schlage/test_e2e.py +++ b/tests/providers/schlage/test_e2e.py @@ -7,7 +7,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.components.lock import LockState from homeassistant.const import ( diff --git a/tests/providers/schlage/test_provider.py b/tests/providers/schlage/test_provider.py index 8b4cda3d8..23b6faa61 100644 --- a/tests/providers/schlage/test_provider.py +++ b/tests/providers/schlage/test_provider.py @@ -4,7 +4,7 @@ from unittest.mock import AsyncMock, patch import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.components.lock import LockState from homeassistant.const import STATE_UNAVAILABLE, STATE_UNKNOWN diff --git a/tests/providers/test_base.py b/tests/providers/test_base.py index 4486ac8af..163cef4bf 100644 --- a/tests/providers/test_base.py +++ b/tests/providers/test_base.py @@ -10,7 +10,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_capture_events, ) diff --git a/tests/providers/test_dispatch.py b/tests/providers/test_dispatch.py index be3ff20d3..c839a039f 100644 --- a/tests/providers/test_dispatch.py +++ b/tests/providers/test_dispatch.py @@ -1,7 +1,7 @@ """Tests for centralized provider class resolution.""" import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError diff --git a/tests/providers/test_seam.py b/tests/providers/test_seam.py index a1801de67..df2fc58ea 100644 --- a/tests/providers/test_seam.py +++ b/tests/providers/test_seam.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock, MagicMock, patch import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr, entity_registry as er diff --git a/tests/providers/virtual/conftest.py b/tests/providers/virtual/conftest.py index a237cc7e3..e5937a4f9 100644 --- a/tests/providers/virtual/conftest.py +++ b/tests/providers/virtual/conftest.py @@ -1,7 +1,7 @@ """Virtual provider test fixtures.""" import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.config_entries import ConfigEntryState from homeassistant.const import ( diff --git a/tests/providers/virtual/test_e2e.py b/tests/providers/virtual/test_e2e.py index fca675d0d..40cdf7971 100644 --- a/tests/providers/virtual/test_e2e.py +++ b/tests/providers/virtual/test_e2e.py @@ -4,7 +4,7 @@ from unittest.mock import patch import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_fire_time_changed, ) diff --git a/tests/providers/zha/conftest.py b/tests/providers/zha/conftest.py index 255af48c3..214dbd361 100644 --- a/tests/providers/zha/conftest.py +++ b/tests/providers/zha/conftest.py @@ -10,7 +10,7 @@ import warnings import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from zhaquirks.legacy import get_device from zigpy.application import ControllerApplication import zigpy.config diff --git a/tests/providers/zha/test_e2e.py b/tests/providers/zha/test_e2e.py index a56a12717..0fc3e92a2 100644 --- a/tests/providers/zha/test_e2e.py +++ b/tests/providers/zha/test_e2e.py @@ -7,7 +7,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_capture_events, ) diff --git a/tests/providers/zha/test_provider.py b/tests/providers/zha/test_provider.py index 055f2ac06..f84bf9aeb 100644 --- a/tests/providers/zha/test_provider.py +++ b/tests/providers/zha/test_provider.py @@ -8,7 +8,7 @@ from unittest.mock import AsyncMock, MagicMock, patch import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry import zigpy.types as zigpy_t from zigpy.zcl import foundation from zigpy.zcl.clusters.closures import DoorLock diff --git a/tests/providers/zigbee2mqtt/conftest.py b/tests/providers/zigbee2mqtt/conftest.py index d324b7487..9ca344afd 100644 --- a/tests/providers/zigbee2mqtt/conftest.py +++ b/tests/providers/zigbee2mqtt/conftest.py @@ -7,7 +7,7 @@ from unittest.mock import DEFAULT, MagicMock import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_fire_mqtt_message, ) diff --git a/tests/providers/zigbee2mqtt/fake_bridge.py b/tests/providers/zigbee2mqtt/fake_bridge.py index 0eb88a25a..ec0f1a80f 100644 --- a/tests/providers/zigbee2mqtt/fake_bridge.py +++ b/tests/providers/zigbee2mqtt/fake_bridge.py @@ -48,7 +48,7 @@ from typing import Any from unittest.mock import DEFAULT, MagicMock -from pytest_homeassistant_custom_component.common import async_fire_mqtt_message +from pytest_homeassistant.common import async_fire_mqtt_message from homeassistant.core import HomeAssistant diff --git a/tests/providers/zigbee2mqtt/test_e2e.py b/tests/providers/zigbee2mqtt/test_e2e.py index d5dbfcf79..5320e5dfe 100644 --- a/tests/providers/zigbee2mqtt/test_e2e.py +++ b/tests/providers/zigbee2mqtt/test_e2e.py @@ -10,7 +10,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_capture_events, async_fire_mqtt_message, diff --git a/tests/providers/zigbee2mqtt/test_payload.py b/tests/providers/zigbee2mqtt/test_payload.py index 9e4aa0479..7704993fa 100644 --- a/tests/providers/zigbee2mqtt/test_payload.py +++ b/tests/providers/zigbee2mqtt/test_payload.py @@ -6,7 +6,7 @@ from unittest.mock import AsyncMock, MagicMock import pytest -from pytest_homeassistant_custom_component.common import async_fire_mqtt_message +from pytest_homeassistant.common import async_fire_mqtt_message from homeassistant.core import HomeAssistant diff --git a/tests/providers/zwave_js/conftest.py b/tests/providers/zwave_js/conftest.py index 313d96013..b468fd384 100644 --- a/tests/providers/zwave_js/conftest.py +++ b/tests/providers/zwave_js/conftest.py @@ -9,7 +9,7 @@ from unittest.mock import AsyncMock, MagicMock, patch import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from zwave_js_server.const.command_class.access_control import ( SetCredentialResult, UserCredentialType, diff --git a/tests/providers/zwave_js/test_e2e.py b/tests/providers/zwave_js/test_e2e.py index 017d74b89..617f04e9d 100644 --- a/tests/providers/zwave_js/test_e2e.py +++ b/tests/providers/zwave_js/test_e2e.py @@ -12,7 +12,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from zwave_js_server.const import CommandClass from zwave_js_server.const.command_class.access_control import ( UserCredentialType, diff --git a/tests/providers/zwave_js/test_events.py b/tests/providers/zwave_js/test_events.py index 298a41296..17acff748 100644 --- a/tests/providers/zwave_js/test_events.py +++ b/tests/providers/zwave_js/test_events.py @@ -3,7 +3,7 @@ from unittest.mock import MagicMock, patch import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from zwave_js_server.const import CommandClass from zwave_js_server.const.command_class.access_control import UserCredentialType from zwave_js_server.const.command_class.lock import CodeSlotStatus diff --git a/tests/providers/zwave_js/test_node_harness.py b/tests/providers/zwave_js/test_node_harness.py index 8da378298..d52afd019 100644 --- a/tests/providers/zwave_js/test_node_harness.py +++ b/tests/providers/zwave_js/test_node_harness.py @@ -11,7 +11,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from zwave_js_server.const import CommandClass, NodeStatus from zwave_js_server.const.command_class.access_control import ( SetCredentialResult, diff --git a/tests/providers/zwave_js/test_provider.py b/tests/providers/zwave_js/test_provider.py index 9bd090893..21c025c73 100644 --- a/tests/providers/zwave_js/test_provider.py +++ b/tests/providers/zwave_js/test_provider.py @@ -3,7 +3,7 @@ from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from zwave_js_server.const import NodeStatus from zwave_js_server.const.command_class.access_control import ( UserCredentialType, diff --git a/tests/providers/zwave_js_ui/conftest.py b/tests/providers/zwave_js_ui/conftest.py index 7536235be..32d2a635e 100644 --- a/tests/providers/zwave_js_ui/conftest.py +++ b/tests/providers/zwave_js_ui/conftest.py @@ -9,7 +9,7 @@ from unittest.mock import DEFAULT, MagicMock, patch import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_fire_mqtt_message, ) diff --git a/tests/providers/zwave_js_ui/test_api.py b/tests/providers/zwave_js_ui/test_api.py index a5df699eb..875269301 100644 --- a/tests/providers/zwave_js_ui/test_api.py +++ b/tests/providers/zwave_js_ui/test_api.py @@ -11,7 +11,7 @@ from unittest.mock import DEFAULT, AsyncMock, MagicMock, Mock, patch import pytest -from pytest_homeassistant_custom_component.common import async_fire_mqtt_message +from pytest_homeassistant.common import async_fire_mqtt_message from homeassistant.components.mqtt import debug_info as mqtt_debug_info from homeassistant.components.mqtt.models import ReceiveMessage diff --git a/tests/providers/zwave_js_ui/test_borrowed.py b/tests/providers/zwave_js_ui/test_borrowed.py index 38660fbb9..3877c1ee4 100644 --- a/tests/providers/zwave_js_ui/test_borrowed.py +++ b/tests/providers/zwave_js_ui/test_borrowed.py @@ -3,7 +3,7 @@ from unittest.mock import patch import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.core import Event, HomeAssistant from homeassistant.helpers import entity_registry as er diff --git a/tests/providers/zwave_js_ui/test_e2e.py b/tests/providers/zwave_js_ui/test_e2e.py index 4e84a5028..22b343f6f 100644 --- a/tests/providers/zwave_js_ui/test_e2e.py +++ b/tests/providers/zwave_js_ui/test_e2e.py @@ -11,7 +11,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_capture_events, async_fire_mqtt_message, diff --git a/tests/providers/zwave_js_ui/test_push.py b/tests/providers/zwave_js_ui/test_push.py index 116067625..38323d121 100644 --- a/tests/providers/zwave_js_ui/test_push.py +++ b/tests/providers/zwave_js_ui/test_push.py @@ -6,7 +6,7 @@ from unittest.mock import AsyncMock, MagicMock, patch import pytest -from pytest_homeassistant_custom_component.common import async_fire_mqtt_message +from pytest_homeassistant.common import async_fire_mqtt_message from zwave_js_server.const.command_class.notification import ( AccessControlNotificationEvent as Event, ) diff --git a/tests/test_adapter.py b/tests/test_adapter.py index cd73bf932..81eb6225e 100644 --- a/tests/test_adapter.py +++ b/tests/test_adapter.py @@ -10,7 +10,7 @@ from unittest.mock import PropertyMock, patch import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_fire_time_changed, ) diff --git a/tests/test_binary_sensor.py b/tests/test_binary_sensor.py index e7433dd7c..bf939f758 100644 --- a/tests/test_binary_sensor.py +++ b/tests/test_binary_sensor.py @@ -10,7 +10,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, ) diff --git a/tests/test_blueprint_behavior.py b/tests/test_blueprint_behavior.py index 47a632023..3a87d49ee 100644 --- a/tests/test_blueprint_behavior.py +++ b/tests/test_blueprint_behavior.py @@ -12,7 +12,7 @@ from unittest.mock import patch import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_mock_service, mock_restore_cache_with_extra_data, diff --git a/tests/test_config.py b/tests/test_config.py index 3822f1c56..bf6dc7fc9 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -4,7 +4,7 @@ from types import SimpleNamespace import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.config_entries import ConfigSubentryData from homeassistant.const import CONF_NAME, CONF_PIN diff --git a/tests/test_config_flow.py b/tests/test_config_flow.py index cb41e619d..9e6780928 100644 --- a/tests/test_config_flow.py +++ b/tests/test_config_flow.py @@ -10,7 +10,7 @@ from unittest.mock import AsyncMock, PropertyMock, patch import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_capture_events, ) diff --git a/tests/test_event.py b/tests/test_event.py index 93949b352..cce45af38 100644 --- a/tests/test_event.py +++ b/tests/test_event.py @@ -4,7 +4,7 @@ from unittest.mock import patch import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, mock_restore_cache_with_extra_data, ) diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py index 56f2bd640..1164ab89b 100644 --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -4,7 +4,7 @@ import inspect import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr, entity_registry as er diff --git a/tests/test_harness.py b/tests/test_harness.py index 5c61710ed..292bfcb81 100644 --- a/tests/test_harness.py +++ b/tests/test_harness.py @@ -17,7 +17,7 @@ import freezegun.api from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.components.text import ( ATTR_VALUE, diff --git a/tests/test_init.py b/tests/test_init.py index 571d0d02a..b34f9cde7 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -9,7 +9,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_fire_time_changed, ) @@ -4103,7 +4103,7 @@ async def test_migration_v5_moves_an_existing_slot_device_to_its_user( # this user's entities, and that drags the device across by itself -- so # the end state is the same whether the migration moved it or not, and a # test that only looked at the end state could not tell the difference. - assert await async_migrate_entry(hass, config_entry) + await async_migrate_entry(hass, config_entry) subentry_id = next(iter(config_entry.subentries)) after = dev_reg.async_get(before.id) diff --git a/tests/test_lock_runtime.py b/tests/test_lock_runtime.py index 74297a7ac..233158946 100644 --- a/tests/test_lock_runtime.py +++ b/tests/test_lock_runtime.py @@ -9,7 +9,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.config_entries import ConfigEntryDisabler, ConfigEntryState from homeassistant.const import ( diff --git a/tests/test_lock_store.py b/tests/test_lock_store.py index d8a202283..874bd2f43 100644 --- a/tests/test_lock_store.py +++ b/tests/test_lock_store.py @@ -4,7 +4,7 @@ from unittest.mock import patch import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.config_entries import ConfigEntryDisabler from homeassistant.const import CONF_ENABLED, CONF_NAME, CONF_PIN diff --git a/tests/test_lockless_entries.py b/tests/test_lockless_entries.py index 950e02365..2f53deb6a 100644 --- a/tests/test_lockless_entries.py +++ b/tests/test_lockless_entries.py @@ -1,6 +1,6 @@ """Tests for entries that manage no locks.""" -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.config_entries import ConfigEntryState from homeassistant.const import ( diff --git a/tests/test_locks.py b/tests/test_locks.py index 1a517bb55..0aa1d29e6 100644 --- a/tests/test_locks.py +++ b/tests/test_locks.py @@ -1,6 +1,6 @@ """Test per-lock naming.""" -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr, entity_registry as er diff --git a/tests/test_logbook.py b/tests/test_logbook.py index d8d617146..2364a8a28 100644 --- a/tests/test_logbook.py +++ b/tests/test_logbook.py @@ -14,7 +14,7 @@ from typing import Any, cast import pytest -from pytest_homeassistant_custom_component.components.recorder.common import ( +from pytest_homeassistant.components.recorder.common import ( async_wait_recording_done, ) diff --git a/tests/test_migration_history.py b/tests/test_migration_history.py index 6da2cf893..aabad1298 100644 --- a/tests/test_migration_history.py +++ b/tests/test_migration_history.py @@ -10,8 +10,8 @@ """ import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry -from pytest_homeassistant_custom_component.components.recorder.common import ( +from pytest_homeassistant.common import MockConfigEntry +from pytest_homeassistant.components.recorder.common import ( async_wait_recording_done, ) diff --git a/tests/test_open_bugs.py b/tests/test_open_bugs.py index 2487c3801..383f63086 100644 --- a/tests/test_open_bugs.py +++ b/tests/test_open_bugs.py @@ -14,7 +14,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.config_entries import ( SOURCE_REAUTH, diff --git a/tests/test_pin_logging.py b/tests/test_pin_logging.py index c752188f4..d2aaddb6c 100644 --- a/tests/test_pin_logging.py +++ b/tests/test_pin_logging.py @@ -12,7 +12,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.const import STATE_ON from homeassistant.core import HomeAssistant diff --git a/tests/test_pin_masking.py b/tests/test_pin_masking.py index c98ec5d3f..c467d4568 100644 --- a/tests/test_pin_masking.py +++ b/tests/test_pin_masking.py @@ -3,7 +3,7 @@ import re import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.const import CONF_ENABLED, CONF_NAME, CONF_PIN from homeassistant.core import HomeAssistant diff --git a/tests/test_queries.py b/tests/test_queries.py index 1f3371d93..4a33b4ad5 100644 --- a/tests/test_queries.py +++ b/tests/test_queries.py @@ -6,7 +6,7 @@ import probatio as vol import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.config_entries import ConfigEntryState from homeassistant.const import ( diff --git a/tests/test_repairs_references.py b/tests/test_repairs_references.py index 1cf307514..d2b317aaa 100644 --- a/tests/test_repairs_references.py +++ b/tests/test_repairs_references.py @@ -1,7 +1,7 @@ """Reporting what still points at an entity ID the migration moved.""" import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.components import automation from homeassistant.config import AUTOMATION_CONFIG_PATH, SCRIPT_CONFIG_PATH diff --git a/tests/test_sensor.py b/tests/test_sensor.py index 5a0f472e5..426c9a1a0 100644 --- a/tests/test_sensor.py +++ b/tests/test_sensor.py @@ -2,7 +2,7 @@ import logging -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.const import ( CONF_ENABLED, diff --git a/tests/test_services.py b/tests/test_services.py index 3eff78b7d..253aab033 100644 --- a/tests/test_services.py +++ b/tests/test_services.py @@ -10,7 +10,7 @@ from freezegun.api import FrozenDateTimeFactory import probatio as vol import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_capture_events, ) diff --git a/tests/test_slot_coordinator.py b/tests/test_slot_coordinator.py index 7637d5e3a..2059d5d31 100644 --- a/tests/test_slot_coordinator.py +++ b/tests/test_slot_coordinator.py @@ -5,7 +5,7 @@ from unittest.mock import patch import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.components.switch import ( DOMAIN as SWITCH_DOMAIN, diff --git a/tests/test_switch.py b/tests/test_switch.py index ce057c074..65df6554b 100644 --- a/tests/test_switch.py +++ b/tests/test_switch.py @@ -4,7 +4,7 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN, SERVICE_TOGGLE diff --git a/tests/test_text.py b/tests/test_text.py index eb84b414b..b667afa3f 100644 --- a/tests/test_text.py +++ b/tests/test_text.py @@ -4,7 +4,7 @@ from types import SimpleNamespace import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.components.text import ( ATTR_MAX, diff --git a/tests/test_unmanaged_codes.py b/tests/test_unmanaged_codes.py index a54bcd4fe..371e862f4 100644 --- a/tests/test_unmanaged_codes.py +++ b/tests/test_unmanaged_codes.py @@ -4,7 +4,7 @@ from unittest.mock import AsyncMock, patch import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.config_entries import ConfigEntryDisabler from homeassistant.const import ( @@ -206,7 +206,7 @@ async def test_a_code_appearing_after_the_sweep_is_not_reported( await hass.async_block_till_done() # And a second migration pass finds nothing to do: the entry is already # at the swept version. - assert await async_migrate_entry(hass, stranded) + await async_migrate_entry(hass, stranded) assert _issue(hass, 9) is None # The one that was there at the sweep is still raised. @@ -256,7 +256,7 @@ async def test_keeping_leaves_the_code_and_stops_asking( assert (await lock.async_get_usercodes())[STRANDED_SLOT].pin == STRANDED_PIN assert ir.async_get(hass).async_get_issue(DOMAIN, issue_id).dismissed_version - assert await async_migrate_entry(hass, stranded) + await async_migrate_entry(hass, stranded) assert ir.async_get(hass).async_get_issue(DOMAIN, issue_id).dismissed_version diff --git a/tests/test_validation.py b/tests/test_validation.py index 2036c2205..cc720fc1b 100644 --- a/tests/test_validation.py +++ b/tests/test_validation.py @@ -1,7 +1,7 @@ """Tests for the credential validation core.""" import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from homeassistant.const import ( CONF_CONDITION, diff --git a/tests/test_websocket.py b/tests/test_websocket.py index d79c1c184..240f50b78 100644 --- a/tests/test_websocket.py +++ b/tests/test_websocket.py @@ -9,11 +9,11 @@ from freezegun.api import FrozenDateTimeFactory import pytest -from pytest_homeassistant_custom_component.common import ( +from pytest_homeassistant.common import ( MockConfigEntry, async_fire_time_changed, ) -from pytest_homeassistant_custom_component.typing import WebSocketGenerator +from pytest_homeassistant.typing import WebSocketGenerator from homeassistant.components.calendar import ( DOMAIN as CALENDAR_DOMAIN,