mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Increase test coverage for IMGW-PIB (#135915)
This commit is contained in:
parent
d349c47694
commit
f0c6b47522
@ -55,7 +55,7 @@ async def test_remove_binary_sensor_entity(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test removing a binary_sensor entity."""
|
"""Test removing a binary_sensor entity."""
|
||||||
entity_id = "binary_sensor.river_name_station_name_flood_alarm"
|
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(
|
entity_registry.async_get_or_create(
|
||||||
BINARY_SENSOR_PLATFORM,
|
BINARY_SENSOR_PLATFORM,
|
||||||
@ -65,4 +65,7 @@ async def test_remove_binary_sensor_entity(
|
|||||||
config_entry=mock_config_entry,
|
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
|
assert hass.states.get(entity_id) is None
|
||||||
|
@ -76,7 +76,7 @@ async def test_remove_entity(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test removing entity."""
|
"""Test removing entity."""
|
||||||
entity_id = "sensor.river_name_station_name_flood_alarm_level"
|
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(
|
entity_registry.async_get_or_create(
|
||||||
SENSOR_PLATFORM,
|
SENSOR_PLATFORM,
|
||||||
@ -86,4 +86,7 @@ async def test_remove_entity(
|
|||||||
config_entry=mock_config_entry,
|
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
|
assert hass.states.get(entity_id) is None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user