diff --git a/tests/components/lifx/__init__.py b/tests/components/lifx/__init__.py index dadb57d09ad211..bb798f6f8a04c2 100644 --- a/tests/components/lifx/__init__.py +++ b/tests/components/lifx/__init__.py @@ -17,6 +17,7 @@ GROUP = "My Group" SERIAL = "aa:bb:cc:dd:ee:cc" MAC_ADDRESS = "aa:bb:cc:dd:ee:cd" +DHCP_FORMATTED_MAC = "aabbccddeecd" DEFAULT_ENTRY_TITLE = LABEL diff --git a/tests/components/lifx/test_config_flow.py b/tests/components/lifx/test_config_flow.py index 702841061667a2..a934c0ce831b7b 100644 --- a/tests/components/lifx/test_config_flow.py +++ b/tests/components/lifx/test_config_flow.py @@ -17,9 +17,9 @@ from . import ( DEFAULT_ENTRY_TITLE, + DHCP_FORMATTED_MAC, IP_ADDRESS, LABEL, - MAC_ADDRESS, MODULE, SERIAL, _mocked_bulb, @@ -345,7 +345,7 @@ async def test_discovered_by_discovery_and_dhcp(hass: HomeAssistant) -> None: DOMAIN, context={"source": config_entries.SOURCE_DHCP}, data=dhcp.DhcpServiceInfo( - ip=IP_ADDRESS, macaddress=MAC_ADDRESS, hostname=LABEL + ip=IP_ADDRESS, macaddress=DHCP_FORMATTED_MAC, hostname=LABEL ), ) await hass.async_block_till_done() @@ -357,7 +357,7 @@ async def test_discovered_by_discovery_and_dhcp(hass: HomeAssistant) -> None: DOMAIN, context={"source": config_entries.SOURCE_DHCP}, data=dhcp.DhcpServiceInfo( - ip=IP_ADDRESS, macaddress="00:00:00:00:00:00", hostname="mock_hostname" + ip=IP_ADDRESS, macaddress="000000000000", hostname="mock_hostname" ), ) await hass.async_block_till_done() @@ -371,7 +371,7 @@ async def test_discovered_by_discovery_and_dhcp(hass: HomeAssistant) -> None: DOMAIN, context={"source": config_entries.SOURCE_DHCP}, data=dhcp.DhcpServiceInfo( - ip="1.2.3.5", macaddress="00:00:00:00:00:01", hostname="mock_hostname" + ip="1.2.3.5", macaddress="000000000001", hostname="mock_hostname" ), ) await hass.async_block_till_done() @@ -384,7 +384,9 @@ async def test_discovered_by_discovery_and_dhcp(hass: HomeAssistant) -> None: [ ( config_entries.SOURCE_DHCP, - dhcp.DhcpServiceInfo(ip=IP_ADDRESS, macaddress=MAC_ADDRESS, hostname=LABEL), + dhcp.DhcpServiceInfo( + ip=IP_ADDRESS, macaddress=DHCP_FORMATTED_MAC, hostname=LABEL + ), ), ( config_entries.SOURCE_HOMEKIT, @@ -439,7 +441,9 @@ async def test_discovered_by_dhcp_or_discovery( [ ( config_entries.SOURCE_DHCP, - dhcp.DhcpServiceInfo(ip=IP_ADDRESS, macaddress=MAC_ADDRESS, hostname=LABEL), + dhcp.DhcpServiceInfo( + ip=IP_ADDRESS, macaddress=DHCP_FORMATTED_MAC, hostname=LABEL + ), ), ( config_entries.SOURCE_HOMEKIT, @@ -480,7 +484,9 @@ async def test_discovered_by_dhcp_or_discovery_failed_to_get_device( [ ( config_entries.SOURCE_DHCP, - dhcp.DhcpServiceInfo(ip=IP_ADDRESS, macaddress=MAC_ADDRESS, hostname=LABEL), + dhcp.DhcpServiceInfo( + ip=IP_ADDRESS, macaddress=DHCP_FORMATTED_MAC, hostname=LABEL + ), ), ( config_entries.SOURCE_HOMEKIT,