1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-20 16:58:58 +01:00

Use constants in default_config tests (#164144)

This commit is contained in:
epenet
2026-02-26 15:31:48 +01:00
committed by GitHub
parent 144b8768a1
commit 91e8e3da7a

View File

@@ -5,6 +5,8 @@ from unittest.mock import patch
import pytest
from homeassistant import bootstrap
from homeassistant.components.default_config import DOMAIN
from homeassistant.components.homeassistant import DOMAIN as HOMEASSISTANT_DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.helpers import recorder as recorder_helper
from homeassistant.setup import async_setup_component
@@ -34,7 +36,7 @@ async def test_setup(hass: HomeAssistant) -> None:
recorder_helper.async_initialize_recorder(hass)
# default_config needs the homeassistant integration, assert it will be
# automatically setup by bootstrap and set it up manually for this test
assert "homeassistant" in bootstrap.CORE_INTEGRATIONS
assert await async_setup_component(hass, "homeassistant", {"foo": "bar"})
assert HOMEASSISTANT_DOMAIN in bootstrap.CORE_INTEGRATIONS
assert await async_setup_component(hass, HOMEASSISTANT_DOMAIN, {"foo": "bar"})
assert await async_setup_component(hass, "default_config", {"foo": "bar"})
assert await async_setup_component(hass, DOMAIN, {"foo": "bar"})