Fix race in dlna_dmr test (#111428)

The entity was removed before the entity registry could update it

```
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/homeassistant/helpers/entity.py", line 1482, in _async_process_registry_update_or_remove
    assert registry_entry is not None
AssertionError

```
pull/111492/head
J. Nick Koston 2024-02-26 06:11:50 -10:00 committed by GitHub
parent 174ebe70d7
commit 1d4e82bd3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -2043,6 +2043,8 @@ async def test_poll_availability(
# Check that an update will poll the device for availability
domain_data_mock.upnp_factory.async_create_device.reset_mock()
await async_update_entity(hass, mock_entity_id)
await hass.async_block_till_done()
domain_data_mock.upnp_factory.async_create_device.assert_awaited_once_with(
MOCK_DEVICE_LOCATION
)
@ -2057,6 +2059,8 @@ async def test_poll_availability(
# Check that an update will notice the device and connect to it
domain_data_mock.upnp_factory.async_create_device.reset_mock()
await async_update_entity(hass, mock_entity_id)
await hass.async_block_till_done()
domain_data_mock.upnp_factory.async_create_device.assert_awaited_once_with(
MOCK_DEVICE_LOCATION
)