mirror of
https://github.com/home-assistant/core.git
synced 2025-08-15 10:31:39 +02:00
cover
This commit is contained in:
@@ -764,7 +764,7 @@ async def test_entity_assignment_to_sub_device(
|
|||||||
|
|
||||||
# Check main device
|
# Check main device
|
||||||
main_device = device_registry.async_get_device(
|
main_device = device_registry.async_get_device(
|
||||||
connections={(dr.CONNECTION_NETWORK_MAC, device.entry.unique_id)}
|
connections={(dr.CONNECTION_NETWORK_MAC, device.device_info.mac_address)}
|
||||||
)
|
)
|
||||||
assert main_device is not None
|
assert main_device is not None
|
||||||
|
|
||||||
|
@@ -1597,19 +1597,19 @@ async def test_sub_device_cleanup(
|
|||||||
# Verify all sub devices exist
|
# Verify all sub devices exist
|
||||||
assert (
|
assert (
|
||||||
device_registry.async_get_device(
|
device_registry.async_get_device(
|
||||||
identifiers={(DOMAIN, f"{device.entry.unique_id}_11111111")}
|
identifiers={(DOMAIN, f"{device.device_info.mac_address}_11111111")}
|
||||||
)
|
)
|
||||||
is not None
|
is not None
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
device_registry.async_get_device(
|
device_registry.async_get_device(
|
||||||
identifiers={(DOMAIN, f"{device.entry.unique_id}_22222222")}
|
identifiers={(DOMAIN, f"{device.device_info.mac_address}_22222222")}
|
||||||
)
|
)
|
||||||
is not None
|
is not None
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
device_registry.async_get_device(
|
device_registry.async_get_device(
|
||||||
identifiers={(DOMAIN, f"{device.entry.unique_id}_33333333")}
|
identifiers={(DOMAIN, f"{device.device_info.mac_address}_33333333")}
|
||||||
)
|
)
|
||||||
is not None
|
is not None
|
||||||
)
|
)
|
||||||
@@ -1636,19 +1636,19 @@ async def test_sub_device_cleanup(
|
|||||||
# Verify device 2 was removed
|
# Verify device 2 was removed
|
||||||
assert (
|
assert (
|
||||||
device_registry.async_get_device(
|
device_registry.async_get_device(
|
||||||
identifiers={(DOMAIN, f"{device.entry.unique_id}_11111111")}
|
identifiers={(DOMAIN, f"{device.device_info.mac_address}_11111111")}
|
||||||
)
|
)
|
||||||
is not None
|
is not None
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
device_registry.async_get_device(
|
device_registry.async_get_device(
|
||||||
identifiers={(DOMAIN, f"{device.entry.unique_id}_22222222")}
|
identifiers={(DOMAIN, f"{device.device_info.mac_address}_22222222")}
|
||||||
)
|
)
|
||||||
is None
|
is None
|
||||||
) # Should be removed
|
) # Should be removed
|
||||||
assert (
|
assert (
|
||||||
device_registry.async_get_device(
|
device_registry.async_get_device(
|
||||||
identifiers={(DOMAIN, f"{device.entry.unique_id}_33333333")}
|
identifiers={(DOMAIN, f"{device.device_info.mac_address}_33333333")}
|
||||||
)
|
)
|
||||||
is not None
|
is not None
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user