mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 16:57:19 +00:00
Use correctly formatted MAC in bond tests (#147887)
This commit is contained in:
parent
23f1e8d1a3
commit
852522219c
@ -15,7 +15,6 @@ from homeassistant.config_entries import ConfigEntryState
|
|||||||
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_HOST
|
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_HOST
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.data_entry_flow import FlowResultType
|
from homeassistant.data_entry_flow import FlowResultType
|
||||||
from homeassistant.helpers.device_registry import format_mac
|
|
||||||
from homeassistant.helpers.service_info.dhcp import DhcpServiceInfo
|
from homeassistant.helpers.service_info.dhcp import DhcpServiceInfo
|
||||||
from homeassistant.helpers.service_info.zeroconf import ZeroconfServiceInfo
|
from homeassistant.helpers.service_info.zeroconf import ZeroconfServiceInfo
|
||||||
|
|
||||||
@ -319,7 +318,7 @@ async def test_dhcp_discovery(hass: HomeAssistant) -> None:
|
|||||||
data=DhcpServiceInfo(
|
data=DhcpServiceInfo(
|
||||||
ip="127.0.0.1",
|
ip="127.0.0.1",
|
||||||
hostname="Bond-KVPRBDJ45842",
|
hostname="Bond-KVPRBDJ45842",
|
||||||
macaddress=format_mac("3c6a2c1c8c80"),
|
macaddress="3c6a2c1c8c80",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
assert result["type"] is FlowResultType.FORM
|
assert result["type"] is FlowResultType.FORM
|
||||||
@ -365,7 +364,7 @@ async def test_dhcp_discovery_already_exists(hass: HomeAssistant) -> None:
|
|||||||
data=DhcpServiceInfo(
|
data=DhcpServiceInfo(
|
||||||
ip="127.0.0.1",
|
ip="127.0.0.1",
|
||||||
hostname="Bond-KVPRBDJ45842".lower(),
|
hostname="Bond-KVPRBDJ45842".lower(),
|
||||||
macaddress=format_mac("3c6a2c1c8c80"),
|
macaddress="3c6a2c1c8c80",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
assert result["type"] is FlowResultType.ABORT
|
assert result["type"] is FlowResultType.ABORT
|
||||||
@ -382,7 +381,7 @@ async def test_dhcp_discovery_short_name(hass: HomeAssistant) -> None:
|
|||||||
data=DhcpServiceInfo(
|
data=DhcpServiceInfo(
|
||||||
ip="127.0.0.1",
|
ip="127.0.0.1",
|
||||||
hostname="Bond-KVPRBDJ",
|
hostname="Bond-KVPRBDJ",
|
||||||
macaddress=format_mac("3c6a2c1c8c80"),
|
macaddress="3c6a2c1c8c80",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
assert result["type"] is FlowResultType.FORM
|
assert result["type"] is FlowResultType.FORM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user