core/tests/components/srp_energy/test_init.py

17 lines
614 B
Python
Raw Normal View History

2020-11-20 13:18:02 +00:00
"""Tests for Srp Energy component Init."""
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
2020-11-20 13:18:02 +00:00
async def test_setup_entry(hass: HomeAssistant, init_integration) -> None:
"""Test setup entry."""
assert init_integration.state == ConfigEntryState.LOADED
2020-11-20 13:18:02 +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."""
assert init_integration.state == ConfigEntryState.LOADED
2020-11-20 13:18:02 +00:00
assert await hass.config_entries.async_unload(init_integration.entry_id)
await hass.async_block_till_done()