Use new ServiceInfo location in component tests (part 4) (#136065)

This commit is contained in:
epenet
2025-01-20 13:19:17 +01:00
committed by GitHub
parent af40b6524e
commit c5efad3a2d
14 changed files with 120 additions and 103 deletions

View File

@@ -8,10 +8,10 @@ import broadlink.exceptions as blke
import pytest
from homeassistant import config_entries
from homeassistant.components import dhcp
from homeassistant.components.broadlink.const import DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType
from homeassistant.helpers.service_info.dhcp import DhcpServiceInfo
from . import get_device
@@ -828,7 +828,7 @@ async def test_dhcp_can_finish(hass: HomeAssistant) -> None:
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_DHCP},
data=dhcp.DhcpServiceInfo(
data=DhcpServiceInfo(
hostname="broadlink",
ip="1.2.3.4",
macaddress=device.mac,
@@ -862,7 +862,7 @@ async def test_dhcp_fails_to_connect(hass: HomeAssistant) -> None:
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_DHCP},
data=dhcp.DhcpServiceInfo(
data=DhcpServiceInfo(
hostname="broadlink",
ip="1.2.3.4",
macaddress="34ea34b43b5a",
@@ -881,7 +881,7 @@ async def test_dhcp_unreachable(hass: HomeAssistant) -> None:
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_DHCP},
data=dhcp.DhcpServiceInfo(
data=DhcpServiceInfo(
hostname="broadlink",
ip="1.2.3.4",
macaddress="34ea34b43b5a",
@@ -900,7 +900,7 @@ async def test_dhcp_connect_unknown_error(hass: HomeAssistant) -> None:
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_DHCP},
data=dhcp.DhcpServiceInfo(
data=DhcpServiceInfo(
hostname="broadlink",
ip="1.2.3.4",
macaddress="34ea34b43b5a",
@@ -922,7 +922,7 @@ async def test_dhcp_device_not_supported(hass: HomeAssistant) -> None:
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_DHCP},
data=dhcp.DhcpServiceInfo(
data=DhcpServiceInfo(
hostname="broadlink",
ip=device.host,
macaddress=device.mac,
@@ -946,7 +946,7 @@ async def test_dhcp_already_exists(hass: HomeAssistant) -> None:
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_DHCP},
data=dhcp.DhcpServiceInfo(
data=DhcpServiceInfo(
hostname="broadlink",
ip="1.2.3.4",
macaddress="34ea34b43b5a",
@@ -971,7 +971,7 @@ async def test_dhcp_updates_host(hass: HomeAssistant) -> None:
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_DHCP},
data=dhcp.DhcpServiceInfo(
data=DhcpServiceInfo(
hostname="broadlink",
ip="4.5.6.7",
macaddress="34ea34b43b5a",