mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Don't use kitchen_sink integration in config entries tests (#133012)
This commit is contained in:
parent
d49b1b2d6b
commit
a30c942fa7
@ -255,9 +255,7 @@ async def test_get_entries(hass: HomeAssistant, client: TestClient) -> None:
|
|||||||
|
|
||||||
async def test_remove_entry(hass: HomeAssistant, client: TestClient) -> None:
|
async def test_remove_entry(hass: HomeAssistant, client: TestClient) -> None:
|
||||||
"""Test removing an entry via the API."""
|
"""Test removing an entry via the API."""
|
||||||
entry = MockConfigEntry(
|
entry = MockConfigEntry(domain="test", state=core_ce.ConfigEntryState.LOADED)
|
||||||
domain="kitchen_sink", state=core_ce.ConfigEntryState.LOADED
|
|
||||||
)
|
|
||||||
entry.add_to_hass(hass)
|
entry.add_to_hass(hass)
|
||||||
resp = await client.delete(f"/api/config/config_entries/entry/{entry.entry_id}")
|
resp = await client.delete(f"/api/config/config_entries/entry/{entry.entry_id}")
|
||||||
assert resp.status == HTTPStatus.OK
|
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:
|
async def test_reload_entry(hass: HomeAssistant, client: TestClient) -> None:
|
||||||
"""Test reloading an entry via the API."""
|
"""Test reloading an entry via the API."""
|
||||||
entry = MockConfigEntry(
|
entry = MockConfigEntry(domain="test", state=core_ce.ConfigEntryState.LOADED)
|
||||||
domain="kitchen_sink", state=core_ce.ConfigEntryState.LOADED
|
|
||||||
)
|
|
||||||
entry.add_to_hass(hass)
|
entry.add_to_hass(hass)
|
||||||
hass.config.components.add("kitchen_sink")
|
hass.config.components.add("test")
|
||||||
resp = await client.post(
|
resp = await client.post(
|
||||||
f"/api/config/config_entries/entry/{entry.entry_id}/reload"
|
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", {})
|
assert await async_setup_component(hass, "config", {})
|
||||||
ws_client = await hass_ws_client(hass)
|
ws_client = await hass_ws_client(hass)
|
||||||
|
|
||||||
entry = MockConfigEntry(
|
entry = MockConfigEntry(domain="test", state=core_ce.ConfigEntryState.LOADED)
|
||||||
domain="kitchen_sink", state=core_ce.ConfigEntryState.LOADED
|
|
||||||
)
|
|
||||||
entry.add_to_hass(hass)
|
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_new_entities is False
|
||||||
assert entry.pref_disable_polling 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", {})
|
assert await async_setup_component(hass, "config", {})
|
||||||
ws_client = await hass_ws_client(hass)
|
ws_client = await hass_ws_client(hass)
|
||||||
|
|
||||||
entry = MockConfigEntry(
|
entry = MockConfigEntry(domain="test", state=core_ce.ConfigEntryState.LOADED)
|
||||||
domain="kitchen_sink", state=core_ce.ConfigEntryState.LOADED
|
|
||||||
)
|
|
||||||
entry.add_to_hass(hass)
|
entry.add_to_hass(hass)
|
||||||
assert entry.disabled_by is None
|
assert entry.disabled_by is None
|
||||||
hass.config.components.add("kitchen_sink")
|
hass.config.components.add("test")
|
||||||
|
|
||||||
# Disable
|
# Disable
|
||||||
await ws_client.send_json(
|
await ws_client.send_json(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user