Use correctly formatted MAC in lamarzocco tests (#147874)

This commit is contained in:
epenet 2025-07-01 14:13:21 +02:00 committed by GitHub
parent c92873bbff
commit 871296dff6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -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,

View File

@ -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(