mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Use correctly formatted MAC in wmspro tests (#147876)
This commit is contained in:
parent
4ebffa8d23
commit
b47f989c77
@ -50,7 +50,7 @@ async def test_config_flow_from_dhcp(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test we can handle DHCP discovery to create a config entry."""
|
"""Test we can handle DHCP discovery to create a config entry."""
|
||||||
info = DhcpServiceInfo(
|
info = DhcpServiceInfo(
|
||||||
ip="1.2.3.4", hostname="webcontrol", macaddress="00:11:22:33:44:55"
|
ip="1.2.3.4", hostname="webcontrol", macaddress="001122334455"
|
||||||
)
|
)
|
||||||
result = await hass.config_entries.flow.async_init(
|
result = await hass.config_entries.flow.async_init(
|
||||||
DOMAIN, context={"source": SOURCE_DHCP}, data=info
|
DOMAIN, context={"source": SOURCE_DHCP}, data=info
|
||||||
@ -109,7 +109,7 @@ async def test_config_flow_from_dhcp_add_mac(
|
|||||||
assert hass.config_entries.async_entries(DOMAIN)[0].unique_id is None
|
assert hass.config_entries.async_entries(DOMAIN)[0].unique_id is None
|
||||||
|
|
||||||
info = DhcpServiceInfo(
|
info = DhcpServiceInfo(
|
||||||
ip="1.2.3.4", hostname="webcontrol", macaddress="00:11:22:33:44:55"
|
ip="1.2.3.4", hostname="webcontrol", macaddress="001122334455"
|
||||||
)
|
)
|
||||||
result = await hass.config_entries.flow.async_init(
|
result = await hass.config_entries.flow.async_init(
|
||||||
DOMAIN, context={"source": SOURCE_DHCP}, data=info
|
DOMAIN, context={"source": SOURCE_DHCP}, data=info
|
||||||
@ -126,7 +126,7 @@ async def test_config_flow_from_dhcp_ip_update(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test we can use DHCP discovery to update IP in a config entry."""
|
"""Test we can use DHCP discovery to update IP in a config entry."""
|
||||||
info = DhcpServiceInfo(
|
info = DhcpServiceInfo(
|
||||||
ip="1.2.3.4", hostname="webcontrol", macaddress="00:11:22:33:44:55"
|
ip="1.2.3.4", hostname="webcontrol", macaddress="001122334455"
|
||||||
)
|
)
|
||||||
result = await hass.config_entries.flow.async_init(
|
result = await hass.config_entries.flow.async_init(
|
||||||
DOMAIN, context={"source": SOURCE_DHCP}, data=info
|
DOMAIN, context={"source": SOURCE_DHCP}, data=info
|
||||||
@ -154,7 +154,7 @@ async def test_config_flow_from_dhcp_ip_update(
|
|||||||
assert hass.config_entries.async_entries(DOMAIN)[0].unique_id == "00:11:22:33:44:55"
|
assert hass.config_entries.async_entries(DOMAIN)[0].unique_id == "00:11:22:33:44:55"
|
||||||
|
|
||||||
info = DhcpServiceInfo(
|
info = DhcpServiceInfo(
|
||||||
ip="5.6.7.8", hostname="webcontrol", macaddress="00:11:22:33:44:55"
|
ip="5.6.7.8", hostname="webcontrol", macaddress="001122334455"
|
||||||
)
|
)
|
||||||
result = await hass.config_entries.flow.async_init(
|
result = await hass.config_entries.flow.async_init(
|
||||||
DOMAIN, context={"source": SOURCE_DHCP}, data=info
|
DOMAIN, context={"source": SOURCE_DHCP}, data=info
|
||||||
@ -172,7 +172,7 @@ async def test_config_flow_from_dhcp_no_update(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test we do not use DHCP discovery to overwrite hostname with IP in config entry."""
|
"""Test we do not use DHCP discovery to overwrite hostname with IP in config entry."""
|
||||||
info = DhcpServiceInfo(
|
info = DhcpServiceInfo(
|
||||||
ip="1.2.3.4", hostname="webcontrol", macaddress="00:11:22:33:44:55"
|
ip="1.2.3.4", hostname="webcontrol", macaddress="001122334455"
|
||||||
)
|
)
|
||||||
result = await hass.config_entries.flow.async_init(
|
result = await hass.config_entries.flow.async_init(
|
||||||
DOMAIN, context={"source": SOURCE_DHCP}, data=info
|
DOMAIN, context={"source": SOURCE_DHCP}, data=info
|
||||||
@ -200,7 +200,7 @@ async def test_config_flow_from_dhcp_no_update(
|
|||||||
assert hass.config_entries.async_entries(DOMAIN)[0].unique_id == "00:11:22:33:44:55"
|
assert hass.config_entries.async_entries(DOMAIN)[0].unique_id == "00:11:22:33:44:55"
|
||||||
|
|
||||||
info = DhcpServiceInfo(
|
info = DhcpServiceInfo(
|
||||||
ip="5.6.7.8", hostname="webcontrol", macaddress="00:11:22:33:44:55"
|
ip="5.6.7.8", hostname="webcontrol", macaddress="001122334455"
|
||||||
)
|
)
|
||||||
result = await hass.config_entries.flow.async_init(
|
result = await hass.config_entries.flow.async_init(
|
||||||
DOMAIN, context={"source": SOURCE_DHCP}, data=info
|
DOMAIN, context={"source": SOURCE_DHCP}, data=info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user