Fix formatting of mac addresses from dhcp discovery mocking in elkm1 (#110564)

dhcp returns addresses in lowercase without :
pull/110600/head
J. Nick Koston 2024-02-14 13:58:40 -06:00 committed by GitHub
parent 5ce39f2177
commit 16d2482fe6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,7 @@ from homeassistant.components.elkm1.const import DOMAIN
from homeassistant.const import CONF_HOST, CONF_PASSWORD
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType
from homeassistant.helpers import device_registry as dr
from . import (
ELK_DISCOVERY,
@ -25,7 +26,9 @@ from . import (
from tests.common import MockConfigEntry
DHCP_DISCOVERY = dhcp.DhcpServiceInfo(MOCK_IP_ADDRESS, "", MOCK_MAC)
DHCP_DISCOVERY = dhcp.DhcpServiceInfo(
MOCK_IP_ADDRESS, "", dr.format_mac(MOCK_MAC).replace(":", "")
)
ELK_DISCOVERY_INFO = asdict(ELK_DISCOVERY)
ELK_DISCOVERY_INFO_NON_STANDARD_PORT = asdict(ELK_DISCOVERY_NON_STANDARD_PORT)