Use correctly formatted MAC in bond tests (#147887)

This commit is contained in:
epenet 2025-07-01 17:56:10 +02:00 committed by GitHub
parent 23f1e8d1a3
commit 852522219c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,7 +15,6 @@ from homeassistant.config_entries import ConfigEntryState
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_HOST
from homeassistant.core import HomeAssistant
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.zeroconf import ZeroconfServiceInfo
@ -319,7 +318,7 @@ async def test_dhcp_discovery(hass: HomeAssistant) -> None:
data=DhcpServiceInfo(
ip="127.0.0.1",
hostname="Bond-KVPRBDJ45842",
macaddress=format_mac("3c6a2c1c8c80"),
macaddress="3c6a2c1c8c80",
),
)
assert result["type"] is FlowResultType.FORM
@ -365,7 +364,7 @@ async def test_dhcp_discovery_already_exists(hass: HomeAssistant) -> None:
data=DhcpServiceInfo(
ip="127.0.0.1",
hostname="Bond-KVPRBDJ45842".lower(),
macaddress=format_mac("3c6a2c1c8c80"),
macaddress="3c6a2c1c8c80",
),
)
assert result["type"] is FlowResultType.ABORT
@ -382,7 +381,7 @@ async def test_dhcp_discovery_short_name(hass: HomeAssistant) -> None:
data=DhcpServiceInfo(
ip="127.0.0.1",
hostname="Bond-KVPRBDJ",
macaddress=format_mac("3c6a2c1c8c80"),
macaddress="3c6a2c1c8c80",
),
)
assert result["type"] is FlowResultType.FORM