Remove obsolete entity count safeguards when using `snapshot_platform` test helper (#127736)

remove obsolete safeguards
pull/127739/head
Michael 2024-10-06 15:50:16 +02:00 committed by GitHub
parent 0d795aad16
commit 808d93d767
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 0 additions and 26 deletions

View File

@ -119,7 +119,6 @@ async def test_binary_sensors(
with patch("homeassistant.components.axis.PLATFORMS", [Platform.BINARY_SENSOR]):
config_entry = await config_entry_factory()
mock_rtsp_event(**event)
assert len(hass.states.async_entity_ids(BINARY_SENSOR_DOMAIN)) == 1
await snapshot_platform(hass, entity_registry, snapshot, config_entry.entry_id)

View File

@ -42,9 +42,6 @@ async def test_button_setup(
assert await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
states = hass.states.async_all()
assert len(states) == 5
await snapshot_platform(hass, entity_registry, snapshot, entry.entry_id)

View File

@ -39,9 +39,6 @@ async def test_sensor_setup(
assert await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
states = hass.states.async_all()
assert len(states) == 16
await snapshot_platform(hass, entity_registry, snapshot, entry.entry_id)

View File

@ -46,9 +46,6 @@ async def test_update_entities_initialized(
assert await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
states = hass.states.async_all()
assert len(states) == 1
await snapshot_platform(hass, entity_registry, snapshot, entry.entry_id)
@ -71,9 +68,6 @@ async def test_update_available(
assert await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
states = hass.states.async_all()
assert len(states) == 1
await snapshot_platform(hass, entity_registry, snapshot, entry.entry_id)
@ -102,9 +96,6 @@ async def test_available_update_can_be_installed(
assert await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
states = hass.states.async_all()
assert len(states) == 1
await snapshot_platform(hass, entity_registry, snapshot, entry.entry_id)
await hass.services.async_call(

View File

@ -26,7 +26,6 @@ async def test_valid_config(
) -> None:
"""Ensure everything starts correctly."""
await init_integration(hass, mock_config_entry)
assert len(hass.states.async_entity_ids()) == 6
await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id)

View File

@ -27,7 +27,4 @@ async def test_async_setup_entry(
):
entry = await init_integration(hass, VALID_CONFIG, NC_DATA)
states = hass.states.async_all()
assert len(states) == 6
await snapshot_platform(hass, entity_registry, snapshot, entry.entry_id)

View File

@ -25,7 +25,4 @@ async def test_async_setup_entry(
with patch("homeassistant.components.nextcloud.PLATFORMS", [Platform.SENSOR]):
entry = await init_integration(hass, VALID_CONFIG, NC_DATA)
states = hass.states.async_all()
assert len(states) == 80
await snapshot_platform(hass, entity_registry, snapshot, entry.entry_id)

View File

@ -26,9 +26,6 @@ async def test_async_setup_entry(
with patch("homeassistant.components.nextcloud.PLATFORMS", [Platform.UPDATE]):
entry = await init_integration(hass, VALID_CONFIG, NC_DATA)
states = hass.states.async_all()
assert len(states) == 1
await snapshot_platform(hass, entity_registry, snapshot, entry.entry_id)