Fix formatting of mac addresses from dhcp discovery mocking in emonitor (#110565)
dhcp returns addresses in lowercase without :pull/110600/head
parent
730e8ab5f3
commit
5ce39f2177
|
@ -12,6 +12,12 @@ from homeassistant.core import HomeAssistant
|
|||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
DHCP_SERVICE_INFO = dhcp.DhcpServiceInfo(
|
||||
hostname="emonitor",
|
||||
ip="1.2.3.4",
|
||||
macaddress="aabbccddeeff",
|
||||
)
|
||||
|
||||
|
||||
def _mock_emonitor():
|
||||
return EmonitorStatus(
|
||||
|
@ -103,11 +109,7 @@ async def test_dhcp_can_confirm(hass: HomeAssistant) -> None:
|
|||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={"source": config_entries.SOURCE_DHCP},
|
||||
data=dhcp.DhcpServiceInfo(
|
||||
hostname="emonitor",
|
||||
ip="1.2.3.4",
|
||||
macaddress="aa:bb:cc:dd:ee:ff",
|
||||
),
|
||||
data=DHCP_SERVICE_INFO,
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
|
@ -146,11 +148,7 @@ async def test_dhcp_fails_to_connect(hass: HomeAssistant) -> None:
|
|||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={"source": config_entries.SOURCE_DHCP},
|
||||
data=dhcp.DhcpServiceInfo(
|
||||
hostname="emonitor",
|
||||
ip="1.2.3.4",
|
||||
macaddress="aa:bb:cc:dd:ee:ff",
|
||||
),
|
||||
data=DHCP_SERVICE_INFO,
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
|
@ -175,11 +173,7 @@ async def test_dhcp_already_exists(hass: HomeAssistant) -> None:
|
|||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={"source": config_entries.SOURCE_DHCP},
|
||||
data=dhcp.DhcpServiceInfo(
|
||||
hostname="emonitor",
|
||||
ip="1.2.3.4",
|
||||
macaddress="aa:bb:cc:dd:ee:ff",
|
||||
),
|
||||
data=DHCP_SERVICE_INFO,
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
|
|
Loading…
Reference in New Issue