Skip to content

Commit 5060d4e

Browse files
Fix tests
1 parent bcbf61d commit 5060d4e

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

tests/test_init.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async def test_setup(
5959
"entity_id": "sensor.test_source",
6060
"type": "max",
6161
},
62-
title=DEFAULT_NAME
62+
title=DEFAULT_NAME,
6363
)
6464
periodic_min_max_config_entry.add_to_hass(hass)
6565
assert await hass.config_entries.async_setup(periodic_min_max_config_entry.entry_id)
@@ -74,16 +74,10 @@ async def test_setup(
7474
assert periodic_min_max_entity is not None
7575
assert periodic_min_max_entity.device_id == source_entity.device_id
7676

77-
# After reloading the config entry, check linked device
78-
devices_after_reload = device_registry.devices.get_devices_for_config_entry_id(
77+
# Remove the config entry
78+
assert await hass.config_entries.async_remove(
7979
periodic_min_max_config_entry.entry_id
8080
)
81-
assert len(devices_after_reload) == 1
82-
83-
assert devices_after_reload[0].id == source_device_entry.id
84-
85-
# Remove the config entry
86-
assert await hass.config_entries.async_remove(periodic_min_max_config_entry.entry_id)
8781
await hass.async_block_till_done()
8882

8983
# Check the state and entity registry entry are removed

0 commit comments

Comments
 (0)