Don't use kitchen_sink integration in config entries tests (#133012)

pull/133020/head
Erik Montnemery 2024-12-12 10:42:27 +01:00 committed by GitHub
parent d49b1b2d6b
commit a30c942fa7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 15 deletions

View File

@ -255,9 +255,7 @@ async def test_get_entries(hass: HomeAssistant, client: TestClient) -> None:
async def test_remove_entry(hass: HomeAssistant, client: TestClient) -> None:
"""Test removing an entry via the API."""
entry = MockConfigEntry(
domain="kitchen_sink", state=core_ce.ConfigEntryState.LOADED
)
entry = MockConfigEntry(domain="test", state=core_ce.ConfigEntryState.LOADED)
entry.add_to_hass(hass)
resp = await client.delete(f"/api/config/config_entries/entry/{entry.entry_id}")
assert resp.status == HTTPStatus.OK
@ -268,11 +266,9 @@ async def test_remove_entry(hass: HomeAssistant, client: TestClient) -> None:
async def test_reload_entry(hass: HomeAssistant, client: TestClient) -> None:
"""Test reloading an entry via the API."""
entry = MockConfigEntry(
domain="kitchen_sink", state=core_ce.ConfigEntryState.LOADED
)
entry = MockConfigEntry(domain="test", state=core_ce.ConfigEntryState.LOADED)
entry.add_to_hass(hass)
hass.config.components.add("kitchen_sink")
hass.config.components.add("test")
resp = await client.post(
f"/api/config/config_entries/entry/{entry.entry_id}/reload"
)
@ -1157,11 +1153,9 @@ async def test_update_prefrences(
assert await async_setup_component(hass, "config", {})
ws_client = await hass_ws_client(hass)
entry = MockConfigEntry(
domain="kitchen_sink", state=core_ce.ConfigEntryState.LOADED
)
entry = MockConfigEntry(domain="test", state=core_ce.ConfigEntryState.LOADED)
entry.add_to_hass(hass)
hass.config.components.add("kitchen_sink")
hass.config.components.add("test")
assert entry.pref_disable_new_entities is False
assert entry.pref_disable_polling is False
@ -1257,12 +1251,10 @@ async def test_disable_entry(
assert await async_setup_component(hass, "config", {})
ws_client = await hass_ws_client(hass)
entry = MockConfigEntry(
domain="kitchen_sink", state=core_ce.ConfigEntryState.LOADED
)
entry = MockConfigEntry(domain="test", state=core_ce.ConfigEntryState.LOADED)
entry.add_to_hass(hass)
assert entry.disabled_by is None
hass.config.components.add("kitchen_sink")
hass.config.components.add("test")
# Disable
await ws_client.send_json(