From 499c42364eb36e8fd136bf9b15f3c3410d082ec5 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 14 Feb 2024 16:26:14 -0600 Subject: [PATCH] Fix formatting of mac addresses from dhcp discovery mocking in broadlink (#110558) * Fix formatting of mac addresses from dhcp discovery mocking in broadlink dhcp returns addresses in lowercase without : * fix missed ones * broadlink has same format --- tests/components/broadlink/test_config_flow.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/components/broadlink/test_config_flow.py b/tests/components/broadlink/test_config_flow.py index 314e017bede..09365b8f5f4 100644 --- a/tests/components/broadlink/test_config_flow.py +++ b/tests/components/broadlink/test_config_flow.py @@ -10,7 +10,6 @@ from homeassistant import config_entries from homeassistant.components import dhcp from homeassistant.components.broadlink.const import DOMAIN from homeassistant.core import HomeAssistant -from homeassistant.helpers import device_registry as dr from . import get_device @@ -838,7 +837,7 @@ async def test_dhcp_can_finish(hass: HomeAssistant) -> None: data=dhcp.DhcpServiceInfo( hostname="broadlink", ip="1.2.3.4", - macaddress=dr.format_mac(device.mac), + macaddress=device.mac, ), ) await hass.async_block_till_done() @@ -872,7 +871,7 @@ async def test_dhcp_fails_to_connect(hass: HomeAssistant) -> None: data=dhcp.DhcpServiceInfo( hostname="broadlink", ip="1.2.3.4", - macaddress="34:ea:34:b4:3b:5a", + macaddress="34ea34b43b5a", ), ) await hass.async_block_till_done() @@ -891,7 +890,7 @@ async def test_dhcp_unreachable(hass: HomeAssistant) -> None: data=dhcp.DhcpServiceInfo( hostname="broadlink", ip="1.2.3.4", - macaddress="34:ea:34:b4:3b:5a", + macaddress="34ea34b43b5a", ), ) await hass.async_block_till_done() @@ -910,7 +909,7 @@ async def test_dhcp_connect_unknown_error(hass: HomeAssistant) -> None: data=dhcp.DhcpServiceInfo( hostname="broadlink", ip="1.2.3.4", - macaddress="34:ea:34:b4:3b:5a", + macaddress="34ea34b43b5a", ), ) await hass.async_block_till_done() @@ -932,7 +931,7 @@ async def test_dhcp_device_not_supported(hass: HomeAssistant) -> None: data=dhcp.DhcpServiceInfo( hostname="broadlink", ip=device.host, - macaddress=dr.format_mac(device.mac), + macaddress=device.mac, ), ) @@ -956,7 +955,7 @@ async def test_dhcp_already_exists(hass: HomeAssistant) -> None: data=dhcp.DhcpServiceInfo( hostname="broadlink", ip="1.2.3.4", - macaddress="34:ea:34:b4:3b:5a", + macaddress="34ea34b43b5a", ), ) await hass.async_block_till_done() @@ -981,7 +980,7 @@ async def test_dhcp_updates_host(hass: HomeAssistant) -> None: data=dhcp.DhcpServiceInfo( hostname="broadlink", ip="4.5.6.7", - macaddress="34:ea:34:b4:3b:5a", + macaddress="34ea34b43b5a", ), ) await hass.async_block_till_done()