Fix formatting of mac addresses from dhcp discovery mocking in reolink (#110594)
dhcp returns addresses in lowercase without :
This commit is contained in:
parent
269f6be096
commit
4627e8b1fc
2 changed files with 6 additions and 4 deletions
|
@ -24,8 +24,9 @@ TEST_USERNAME = "admin"
|
|||
TEST_USERNAME2 = "username"
|
||||
TEST_PASSWORD = "password"
|
||||
TEST_PASSWORD2 = "new_password"
|
||||
TEST_MAC = "ab:cd:ef:gh:ij:kl"
|
||||
TEST_MAC2 = "12:34:56:78:9a:bc"
|
||||
TEST_MAC = "aa:bb:cc:dd:ee:ff"
|
||||
TEST_MAC2 = "ff:ee:dd:cc:bb:aa"
|
||||
DHCP_FORMATTED_MAC = "aabbccddeeff"
|
||||
TEST_UID = "ABC1234567D89EFG"
|
||||
TEST_PORT = 1234
|
||||
TEST_NVR_NAME = "test_reolink_name"
|
||||
|
|
|
@ -26,6 +26,7 @@ from homeassistant.helpers.device_registry import format_mac
|
|||
from homeassistant.util.dt import utcnow
|
||||
|
||||
from .conftest import (
|
||||
DHCP_FORMATTED_MAC,
|
||||
TEST_HOST,
|
||||
TEST_HOST2,
|
||||
TEST_MAC,
|
||||
|
@ -353,7 +354,7 @@ async def test_dhcp_flow(hass: HomeAssistant, mock_setup_entry: MagicMock) -> No
|
|||
dhcp_data = dhcp.DhcpServiceInfo(
|
||||
ip=TEST_HOST,
|
||||
hostname="Reolink",
|
||||
macaddress=TEST_MAC,
|
||||
macaddress=DHCP_FORMATTED_MAC,
|
||||
)
|
||||
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
|
@ -462,7 +463,7 @@ async def test_dhcp_ip_update(
|
|||
dhcp_data = dhcp.DhcpServiceInfo(
|
||||
ip=TEST_HOST2,
|
||||
hostname="Reolink",
|
||||
macaddress=TEST_MAC,
|
||||
macaddress=DHCP_FORMATTED_MAC,
|
||||
)
|
||||
|
||||
if attr is not None:
|
||||
|
|
Loading…
Add table
Reference in a new issue