Fix formatting of mac addresses from dhcp discovery mocking in dlink (#110562)
* Fix formatting of mac addresses from dhcp discovery mocking in dlink dhcp returns addresses in lowercase without : * fix testspull/110622/head
parent
cd1c633ff9
commit
5988db1670
|
@ -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
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue