2020-11-20 13:18:02 +00:00
|
|
|
"""Tests for Srp Energy component Init."""
|
2024-03-08 13:47:22 +00:00
|
|
|
|
2023-04-12 21:47:37 +00:00
|
|
|
from homeassistant.config_entries import ConfigEntryState
|
2023-02-08 16:12:54 +00:00
|
|
|
from homeassistant.core import HomeAssistant
|
2020-11-20 13:18:02 +00:00
|
|
|
|
|
|
|
|
2023-04-12 21:47:37 +00:00
|
|
|
async def test_setup_entry(hass: HomeAssistant, init_integration) -> None:
|
|
|
|
"""Test setup entry."""
|
2024-04-05 15:37:00 +00:00
|
|
|
assert init_integration.state is ConfigEntryState.LOADED
|
2020-11-20 13:18:02 +00:00
|
|
|
|
|
|
|
|
2023-04-12 21:47:37 +00:00
|
|
|
async def test_unload_entry(hass: HomeAssistant, init_integration) -> None:
|
2020-11-20 13:18:02 +00:00
|
|
|
"""Test being able to unload an entry."""
|
2024-04-05 15:37:00 +00:00
|
|
|
assert init_integration.state is ConfigEntryState.LOADED
|
2020-11-20 13:18:02 +00:00
|
|
|
|
2023-04-12 21:47:37 +00:00
|
|
|
assert await hass.config_entries.async_unload(init_integration.entry_id)
|
|
|
|
await hass.async_block_till_done()
|