Use new ServiceInfo location in core tests (#136067)
parent
077fbb91c0
commit
3342904330
|
@ -16,7 +16,6 @@ import pytest
|
||||||
from syrupy.assertion import SnapshotAssertion
|
from syrupy.assertion import SnapshotAssertion
|
||||||
|
|
||||||
from homeassistant import config_entries, data_entry_flow, loader
|
from homeassistant import config_entries, data_entry_flow, loader
|
||||||
from homeassistant.components import dhcp
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
|
@ -41,6 +40,7 @@ from homeassistant.helpers import entity_registry as er, frame, issue_registry a
|
||||||
from homeassistant.helpers.discovery_flow import DiscoveryKey
|
from homeassistant.helpers.discovery_flow import DiscoveryKey
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
from homeassistant.helpers.json import json_dumps
|
from homeassistant.helpers.json import json_dumps
|
||||||
|
from homeassistant.helpers.service_info.dhcp import DhcpServiceInfo
|
||||||
from homeassistant.helpers.service_info.hassio import HassioServiceInfo
|
from homeassistant.helpers.service_info.hassio import HassioServiceInfo
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||||
|
@ -2645,9 +2645,7 @@ async def test_unique_id_from_discovery_in_setup_retry(
|
||||||
|
|
||||||
VERSION = 1
|
VERSION = 1
|
||||||
|
|
||||||
async def async_step_dhcp(
|
async def async_step_dhcp(self, discovery_info: DhcpServiceInfo) -> FlowResult:
|
||||||
self, discovery_info: dhcp.DhcpServiceInfo
|
|
||||||
) -> FlowResult:
|
|
||||||
"""Test dhcp step."""
|
"""Test dhcp step."""
|
||||||
await self.async_set_unique_id(unique_id)
|
await self.async_set_unique_id(unique_id)
|
||||||
self._abort_if_unique_id_configured()
|
self._abort_if_unique_id_configured()
|
||||||
|
@ -2683,7 +2681,7 @@ async def test_unique_id_from_discovery_in_setup_retry(
|
||||||
discovery_result = await manager.flow.async_init(
|
discovery_result = await manager.flow.async_init(
|
||||||
"comp",
|
"comp",
|
||||||
context={"source": config_entries.SOURCE_DHCP},
|
context={"source": config_entries.SOURCE_DHCP},
|
||||||
data=dhcp.DhcpServiceInfo(
|
data=DhcpServiceInfo(
|
||||||
hostname="any",
|
hostname="any",
|
||||||
ip=host,
|
ip=host,
|
||||||
macaddress=unique_id,
|
macaddress=unique_id,
|
||||||
|
|
Loading…
Reference in New Issue