Include platform only integrations in the manifest list api (#48269)

This commit is contained in:
J. Nick Koston
2021-03-29 00:51:48 -10:00
committed by GitHub
parent e2d3c0ea8f
commit 1fb9008488
5 changed files with 65 additions and 26 deletions

View File

@ -600,3 +600,21 @@ async def test_integration_disabled(hass, caplog):
result = await setup.async_setup_component(hass, "test_component1", {})
assert not result
assert disabled_reason in caplog.text
async def test_async_get_loaded_integrations(hass):
"""Test we can enumerate loaded integations."""
hass.config.components.add("notbase")
hass.config.components.add("switch")
hass.config.components.add("notbase.switch")
hass.config.components.add("myintegration")
hass.config.components.add("device_tracker")
hass.config.components.add("device_tracker.other")
hass.config.components.add("myintegration.light")
assert setup.async_get_loaded_integrations(hass) == {
"other",
"switch",
"notbase",
"myintegration",
"device_tracker",
}