Fix formatting of mac addresses from dhcp discovery mocking in flux_led (#110568)

dhcp returns addresses in lowercase without :
This commit is contained in:
J. Nick Koston 2024-02-14 13:56:00 -06:00 committed by GitHub
parent a87960a323
commit 08f97d66ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -28,6 +28,7 @@ from homeassistant.components.flux_led.const import DOMAIN
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_NAME
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import format_mac
from tests.common import MockConfigEntry
@ -50,7 +51,7 @@ DEFAULT_ENTRY_TITLE = f"{MODEL_DESCRIPTION} {SHORT_MAC_ADDRESS}"
DHCP_DISCOVERY = dhcp.DhcpServiceInfo(
hostname=MODEL,
ip=IP_ADDRESS,
macaddress=MAC_ADDRESS,
macaddress=format_mac(MAC_ADDRESS).replace(":", ""),
)
FLUX_DISCOVERY_PARTIAL = FluxLEDDiscovery(
ipaddr=IP_ADDRESS,

View file

@ -402,7 +402,7 @@ async def test_discovered_by_discovery_and_dhcp(hass: HomeAssistant) -> None:
data=dhcp.DhcpServiceInfo(
hostname="any",
ip=IP_ADDRESS,
macaddress="00:00:00:00:00:00",
macaddress="000000000000",
),
)
await hass.async_block_till_done()