From 875e06249e62069d300dd5ee9cf5dfe0fa68e85b Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 7 Aug 2026 13:33:25 +0200 Subject: [PATCH] Update honeywell device cleanup test (#178441) --- tests/components/honeywell/test_init.py | 47 ------------------------- 1 file changed, 47 deletions(-) diff --git a/tests/components/honeywell/test_init.py b/tests/components/honeywell/test_init.py index 1d18a527e0c9..13418395e2d4 100644 --- a/tests/components/honeywell/test_init.py +++ b/tests/components/honeywell/test_init.py @@ -162,23 +162,7 @@ async def test_remove_stale_device( """Test that the stale device is removed.""" location.devices_by_id[another_device.deviceid] = another_device - config_entry_other = MockConfigEntry( - domain="OtherDomain", - data={}, - unique_id="unique_id", - ) - config_entry_other.add_to_hass(hass) - device_entry_other = device_registry.async_get_or_create( - config_entry_id=config_entry_other.entry_id, - identifiers={("OtherDomain", 7654321)}, - ) - config_entry.add_to_hass(hass) - device_registry.async_update_device( - device_entry_other.id, - add_config_entry_id=config_entry.entry_id, - merge_identifiers={(DOMAIN, 7654321)}, - ) await hass.config_entries.async_setup(config_entry.entry_id) await hass.async_block_till_done() @@ -188,28 +172,9 @@ async def test_remove_stale_device( device_entries = dr.async_entries_for_config_entry( device_registry, config_entry.entry_id ) - - device_entries_other = dr.async_entries_for_config_entry( - device_registry, config_entry_other.entry_id - ) - assert len(device_entries) == 2 assert any((DOMAIN, 1234567) in device.identifiers for device in device_entries) assert any((DOMAIN, 7654321) in device.identifiers for device in device_entries) - # Identifiers are unique per config entry, so Honeywell and OtherDomain have - # separate devices for 7654321; Honeywell's devices do not carry the OtherDomain - # identifier - assert not any( - ("OtherDomain", 7654321) in device.identifiers for device in device_entries - ) - assert len(device_entries_other) == 1 - assert any( - ("OtherDomain", 7654321) in device.identifiers - for device in device_entries_other - ) - assert any( - (DOMAIN, 7654321) in device.identifiers for device in device_entries_other - ) assert await hass.config_entries.async_unload(config_entry.entry_id) await hass.async_block_till_done() @@ -233,15 +198,3 @@ async def test_remove_stale_device( assert len(device_entries) == 1 assert any((DOMAIN, 1234567) in device.identifiers for device in device_entries) assert not any((DOMAIN, 7654321) in device.identifiers for device in device_entries) - assert not any( - ("OtherDomain", 7654321) in device.identifiers for device in device_entries - ) - - device_entries_other = dr.async_entries_for_config_entry( - device_registry, config_entry_other.entry_id - ) - assert len(device_entries_other) == 1 - assert any( - ("OtherDomain", 7654321) in device.identifiers - for device in device_entries_other - )