mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 13:45:12 +02:00
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 ```
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
Reference in New Issue
Block a user