Fix formatting of mac addresses from dhcp discovery mocking in broadlink (#110558)
* Fix formatting of mac addresses from dhcp discovery mocking in broadlink dhcp returns addresses in lowercase without : * fix missed ones * broadlink has same formatpull/110622/head
parent
78bc561700
commit
499c42364e
|
@ -10,7 +10,6 @@ from homeassistant import config_entries
|
||||||
from homeassistant.components import dhcp
|
from homeassistant.components import dhcp
|
||||||
from homeassistant.components.broadlink.const import DOMAIN
|
from homeassistant.components.broadlink.const import DOMAIN
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import device_registry as dr
|
|
||||||
|
|
||||||
from . import get_device
|
from . import get_device
|
||||||
|
|
||||||
|
@ -838,7 +837,7 @@ async def test_dhcp_can_finish(hass: HomeAssistant) -> None:
|
||||||
data=dhcp.DhcpServiceInfo(
|
data=dhcp.DhcpServiceInfo(
|
||||||
hostname="broadlink",
|
hostname="broadlink",
|
||||||
ip="1.2.3.4",
|
ip="1.2.3.4",
|
||||||
macaddress=dr.format_mac(device.mac),
|
macaddress=device.mac,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
@ -872,7 +871,7 @@ async def test_dhcp_fails_to_connect(hass: HomeAssistant) -> None:
|
||||||
data=dhcp.DhcpServiceInfo(
|
data=dhcp.DhcpServiceInfo(
|
||||||
hostname="broadlink",
|
hostname="broadlink",
|
||||||
ip="1.2.3.4",
|
ip="1.2.3.4",
|
||||||
macaddress="34:ea:34:b4:3b:5a",
|
macaddress="34ea34b43b5a",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
@ -891,7 +890,7 @@ async def test_dhcp_unreachable(hass: HomeAssistant) -> None:
|
||||||
data=dhcp.DhcpServiceInfo(
|
data=dhcp.DhcpServiceInfo(
|
||||||
hostname="broadlink",
|
hostname="broadlink",
|
||||||
ip="1.2.3.4",
|
ip="1.2.3.4",
|
||||||
macaddress="34:ea:34:b4:3b:5a",
|
macaddress="34ea34b43b5a",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
@ -910,7 +909,7 @@ async def test_dhcp_connect_unknown_error(hass: HomeAssistant) -> None:
|
||||||
data=dhcp.DhcpServiceInfo(
|
data=dhcp.DhcpServiceInfo(
|
||||||
hostname="broadlink",
|
hostname="broadlink",
|
||||||
ip="1.2.3.4",
|
ip="1.2.3.4",
|
||||||
macaddress="34:ea:34:b4:3b:5a",
|
macaddress="34ea34b43b5a",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
@ -932,7 +931,7 @@ async def test_dhcp_device_not_supported(hass: HomeAssistant) -> None:
|
||||||
data=dhcp.DhcpServiceInfo(
|
data=dhcp.DhcpServiceInfo(
|
||||||
hostname="broadlink",
|
hostname="broadlink",
|
||||||
ip=device.host,
|
ip=device.host,
|
||||||
macaddress=dr.format_mac(device.mac),
|
macaddress=device.mac,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -956,7 +955,7 @@ async def test_dhcp_already_exists(hass: HomeAssistant) -> None:
|
||||||
data=dhcp.DhcpServiceInfo(
|
data=dhcp.DhcpServiceInfo(
|
||||||
hostname="broadlink",
|
hostname="broadlink",
|
||||||
ip="1.2.3.4",
|
ip="1.2.3.4",
|
||||||
macaddress="34:ea:34:b4:3b:5a",
|
macaddress="34ea34b43b5a",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
@ -981,7 +980,7 @@ async def test_dhcp_updates_host(hass: HomeAssistant) -> None:
|
||||||
data=dhcp.DhcpServiceInfo(
|
data=dhcp.DhcpServiceInfo(
|
||||||
hostname="broadlink",
|
hostname="broadlink",
|
||||||
ip="4.5.6.7",
|
ip="4.5.6.7",
|
||||||
macaddress="34:ea:34:b4:3b:5a",
|
macaddress="34ea34b43b5a",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
Loading…
Reference in New Issue