Remove obsolete entity count safeguards when using `snapshot_platform` test helper (#127736)
remove obsolete safeguardspull/127739/head
parent
0d795aad16
commit
808d93d767
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue