Skip to content

Commit

Permalink
Fix formatting of mac addresses from dhcp discovery mocking in broadl…
Browse files Browse the repository at this point in the history
…ink (#110558)

* Fix formatting of mac addresses from dhcp discovery mocking in broadlink

dhcp returns addresses in lowercase without :

* fix missed ones

* broadlink has same format
  • Loading branch information
bdraco authored Feb 14, 2024
1 parent 78bc561 commit 499c423
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tests/components/broadlink/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from homeassistant.components import dhcp
from homeassistant.components.broadlink.const import DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr

from . import get_device

Expand Down Expand Up @@ -838,7 +837,7 @@ async def test_dhcp_can_finish(hass: HomeAssistant) -> None:
data=dhcp.DhcpServiceInfo(
hostname="broadlink",
ip="1.2.3.4",
macaddress=dr.format_mac(device.mac),
macaddress=device.mac,
),
)
await hass.async_block_till_done()
Expand Down Expand Up @@ -872,7 +871,7 @@ async def test_dhcp_fails_to_connect(hass: HomeAssistant) -> None:
data=dhcp.DhcpServiceInfo(
hostname="broadlink",
ip="1.2.3.4",
macaddress="34:ea:34:b4:3b:5a",
macaddress="34ea34b43b5a",
),
)
await hass.async_block_till_done()
Expand All @@ -891,7 +890,7 @@ async def test_dhcp_unreachable(hass: HomeAssistant) -> None:
data=dhcp.DhcpServiceInfo(
hostname="broadlink",
ip="1.2.3.4",
macaddress="34:ea:34:b4:3b:5a",
macaddress="34ea34b43b5a",
),
)
await hass.async_block_till_done()
Expand All @@ -910,7 +909,7 @@ async def test_dhcp_connect_unknown_error(hass: HomeAssistant) -> None:
data=dhcp.DhcpServiceInfo(
hostname="broadlink",
ip="1.2.3.4",
macaddress="34:ea:34:b4:3b:5a",
macaddress="34ea34b43b5a",
),
)
await hass.async_block_till_done()
Expand All @@ -932,7 +931,7 @@ async def test_dhcp_device_not_supported(hass: HomeAssistant) -> None:
data=dhcp.DhcpServiceInfo(
hostname="broadlink",
ip=device.host,
macaddress=dr.format_mac(device.mac),
macaddress=device.mac,
),
)

Expand All @@ -956,7 +955,7 @@ async def test_dhcp_already_exists(hass: HomeAssistant) -> None:
data=dhcp.DhcpServiceInfo(
hostname="broadlink",
ip="1.2.3.4",
macaddress="34:ea:34:b4:3b:5a",
macaddress="34ea34b43b5a",
),
)
await hass.async_block_till_done()
Expand All @@ -981,7 +980,7 @@ async def test_dhcp_updates_host(hass: HomeAssistant) -> None:
data=dhcp.DhcpServiceInfo(
hostname="broadlink",
ip="4.5.6.7",
macaddress="34:ea:34:b4:3b:5a",
macaddress="34ea34b43b5a",
),
)
await hass.async_block_till_done()
Expand Down

0 comments on commit 499c423

Please sign in to comment.