Use config_entry.on_unload rather than local listener implementation in UniFi (#49496)

This commit is contained in:
Robert Svensson 2021-04-20 20:50:42 +02:00 committed by GitHub
parent 138226fa14
commit 63616a9e36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 11 deletions

View file

@ -313,13 +313,10 @@ async def test_reset_after_successful_setup(hass, aioclient_mock):
config_entry = await setup_unifi_integration(hass, aioclient_mock)
controller = hass.data[UNIFI_DOMAIN][config_entry.entry_id]
assert len(controller.listeners) == 6
result = await controller.async_reset()
await hass.async_block_till_done()
assert result is True
assert len(controller.listeners) == 0
async def test_reset_fails(hass, aioclient_mock):