diff --git a/tests/components/dlink/conftest.py b/tests/components/dlink/conftest.py index 73e6baa2666..98cf042c0a3 100644 --- a/tests/components/dlink/conftest.py +++ b/tests/components/dlink/conftest.py @@ -18,6 +18,7 @@ from tests.common import MockConfigEntry HOST = "1.2.3.4" PASSWORD = "123456" MAC = format_mac("AA:BB:CC:DD:EE:FF") +DHCP_FORMATTED_MAC = MAC.replace(":", "") USERNAME = "admin" CONF_DHCP_DATA = { @@ -30,13 +31,13 @@ CONF_DATA = CONF_DHCP_DATA | {CONF_HOST: HOST} CONF_DHCP_FLOW = dhcp.DhcpServiceInfo( ip=HOST, - macaddress=MAC, + macaddress=DHCP_FORMATTED_MAC, hostname="dsp-w215", ) CONF_DHCP_FLOW_NEW_IP = dhcp.DhcpServiceInfo( ip="5.6.7.8", - macaddress=MAC, + macaddress=DHCP_FORMATTED_MAC, hostname="dsp-w215", ) @@ -59,7 +60,7 @@ def config_entry(hass: HomeAssistant) -> MockConfigEntry: @pytest.fixture def config_entry_with_uid(hass: HomeAssistant) -> MockConfigEntry: """Add config entry with unique ID in Home Assistant.""" - return create_entry(hass, unique_id="aa:bb:cc:dd:ee:ff") + return create_entry(hass, unique_id="aabbccddeeff") @pytest.fixture diff --git a/tests/components/dlink/test_config_flow.py b/tests/components/dlink/test_config_flow.py index 5cd34987646..a778a4ccb22 100644 --- a/tests/components/dlink/test_config_flow.py +++ b/tests/components/dlink/test_config_flow.py @@ -152,7 +152,7 @@ async def test_dhcp_already_configured( assert result["type"] == data_entry_flow.FlowResultType.ABORT assert result["reason"] == "already_configured" - assert config_entry.unique_id == "aa:bb:cc:dd:ee:ff" + assert config_entry.unique_id == "aabbccddeeff" async def test_dhcp_unique_id_assignment(