18 lines
620 B
Python
18 lines
620 B
Python
"""Test evil genius labs init."""
|
|
|
|
import pytest
|
|
|
|
from homeassistant.components.evil_genius_labs import PLATFORMS
|
|
from homeassistant.config_entries import ConfigEntryState
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
|
@pytest.mark.parametrize("platforms", [PLATFORMS])
|
|
async def test_setup_unload_entry(
|
|
hass: HomeAssistant, setup_evil_genius_labs, config_entry
|
|
) -> None:
|
|
"""Test setting up and unloading a config entry."""
|
|
assert len(hass.states.async_entity_ids()) == 1
|
|
assert await hass.config_entries.async_unload(config_entry.entry_id)
|
|
assert config_entry.state is ConfigEntryState.NOT_LOADED
|