ci: install home-assistant-frontend (frontend dependency needs hass_frontend in tests); not_ready test registers WS commands directly

This commit is contained in:
Matysh
2026-07-06 00:33:28 +03:00
parent 4f6bd68e5b
commit 290b107c49
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -40,6 +40,6 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: { python-version: "3.13" } with: { python-version: "3.13" }
- run: pip install pytest voluptuous pytest-homeassistant-custom-component - run: pip install pytest voluptuous pytest-homeassistant-custom-component home-assistant-frontend
- name: Backend unit tests (pure + HA harness) - name: Backend unit tests (pure + HA harness)
run: python -m pytest tests_backend/ -q run: python -m pytest tests_backend/ -q
+3 -3
View File
@@ -69,10 +69,10 @@ async def test_config_rev_conflict(hass: HomeAssistant, hass_ws_client: WebSocke
async def test_not_ready_without_entry(hass: HomeAssistant, hass_ws_client: WebSocketGenerator) -> None: async def test_not_ready_without_entry(hass: HomeAssistant, hass_ws_client: WebSocketGenerator) -> None:
"""WS commands answer not_ready when the integration has no loaded entry.""" """WS commands answer not_ready when the integration has no loaded entry."""
# register commands without setting up an entry # register only the WS commands, without an entry
from custom_components.houseplan import async_setup from custom_components.houseplan import websocket_api as hp_ws
assert await async_setup(hass, {}) hp_ws.async_register(hass)
client = await hass_ws_client(hass) client = await hass_ws_client(hass)
await client.send_json_auto_id({"type": "houseplan/layout/get"}) await client.send_json_auto_id({"type": "houseplan/layout/get"})
resp = await client.receive_json() resp = await client.receive_json()