mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Use correctly formatted MAC in lamarzocco tests (#147874)
This commit is contained in:
parent
c92873bbff
commit
871296dff6
@ -34,7 +34,7 @@ def mock_config_entry(
|
||||
version=3,
|
||||
data=USER_INPUT
|
||||
| {
|
||||
CONF_ADDRESS: "00:00:00:00:00:00",
|
||||
CONF_ADDRESS: "000000000000",
|
||||
CONF_TOKEN: "token",
|
||||
},
|
||||
unique_id=mock_lamarzocco.serial_number,
|
||||
|
@ -422,7 +422,7 @@ async def test_dhcp_discovery(
|
||||
data=DhcpServiceInfo(
|
||||
ip="192.168.1.42",
|
||||
hostname=mock_lamarzocco.serial_number,
|
||||
macaddress="aa:bb:cc:dd:ee:ff",
|
||||
macaddress="aabbccddeeff",
|
||||
),
|
||||
)
|
||||
|
||||
@ -436,7 +436,7 @@ async def test_dhcp_discovery(
|
||||
assert result["type"] is FlowResultType.CREATE_ENTRY
|
||||
assert result["data"] == {
|
||||
**USER_INPUT,
|
||||
CONF_ADDRESS: "aa:bb:cc:dd:ee:ff",
|
||||
CONF_ADDRESS: "aabbccddeeff",
|
||||
CONF_TOKEN: None,
|
||||
}
|
||||
|
||||
@ -453,7 +453,7 @@ async def test_dhcp_discovery_abort_on_hostname_changed(
|
||||
data=DhcpServiceInfo(
|
||||
ip="192.168.1.42",
|
||||
hostname="custom_name",
|
||||
macaddress="00:00:00:00:00:00",
|
||||
macaddress="000000000000",
|
||||
),
|
||||
)
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
@ -475,14 +475,14 @@ async def test_dhcp_already_configured_and_update(
|
||||
data=DhcpServiceInfo(
|
||||
ip="192.168.1.42",
|
||||
hostname=mock_lamarzocco.serial_number,
|
||||
macaddress="aa:bb:cc:dd:ee:ff",
|
||||
macaddress="aabbccddeeff",
|
||||
),
|
||||
)
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
assert result["reason"] == "already_configured"
|
||||
|
||||
assert mock_config_entry.data[CONF_ADDRESS] != old_address
|
||||
assert mock_config_entry.data[CONF_ADDRESS] == "aa:bb:cc:dd:ee:ff"
|
||||
assert mock_config_entry.data[CONF_ADDRESS] == "aabbccddeeff"
|
||||
|
||||
|
||||
async def test_options_flow(
|
||||
|
Loading…
x
Reference in New Issue
Block a user