Files
core/tests/components/srp_energy/test_init.py
T
2026-06-22 23:51:33 +02:00

23 lines
732 B
Python

"""Tests for Srp Energy component Init."""
from homeassistant.components.recorder import Recorder
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
async def test_setup_entry(
recorder_mock: Recorder, hass: HomeAssistant, init_integration
) -> None:
"""Test setup entry."""
assert init_integration.state is ConfigEntryState.LOADED
async def test_unload_entry(
recorder_mock: Recorder, hass: HomeAssistant, init_integration
) -> None:
"""Test being able to unload an entry."""
assert init_integration.state is ConfigEntryState.LOADED
assert await hass.config_entries.async_unload(init_integration.entry_id)
await hass.async_block_till_done()