Increase test coverage for IMGW-PIB (#135915)

This commit is contained in:
Maciej Bieniek 2025-01-18 12:31:17 +00:00 committed by GitHub
parent d349c47694
commit f0c6b47522
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -55,7 +55,7 @@ async def test_remove_binary_sensor_entity(
) -> None:
"""Test removing a binary_sensor entity."""
entity_id = "binary_sensor.river_name_station_name_flood_alarm"
await init_integration(hass, mock_config_entry)
mock_config_entry.add_to_hass(hass)
entity_registry.async_get_or_create(
BINARY_SENSOR_PLATFORM,
@ -65,4 +65,7 @@ async def test_remove_binary_sensor_entity(
config_entry=mock_config_entry,
)
await hass.config_entries.async_setup(mock_config_entry.entry_id)
await hass.async_block_till_done()
assert hass.states.get(entity_id) is None

View File

@ -76,7 +76,7 @@ async def test_remove_entity(
) -> None:
"""Test removing entity."""
entity_id = "sensor.river_name_station_name_flood_alarm_level"
await init_integration(hass, mock_config_entry)
mock_config_entry.add_to_hass(hass)
entity_registry.async_get_or_create(
SENSOR_PLATFORM,
@ -86,4 +86,7 @@ async def test_remove_entity(
config_entry=mock_config_entry,
)
await hass.config_entries.async_setup(mock_config_entry.entry_id)
await hass.async_block_till_done()
assert hass.states.get(entity_id) is None