mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Hardware integration MVP (#71677)
This commit is contained in:
18
tests/components/hardware/test_websocket_api.py
Normal file
18
tests/components/hardware/test_websocket_api.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""Test the hardware websocket API."""
|
||||
from homeassistant.components.hardware.const import DOMAIN
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
|
||||
async def test_board_info(hass: HomeAssistant, hass_ws_client) -> None:
|
||||
"""Test we can get the board info."""
|
||||
assert await async_setup_component(hass, DOMAIN, {})
|
||||
|
||||
client = await hass_ws_client(hass)
|
||||
|
||||
await client.send_json({"id": 1, "type": "hardware/info"})
|
||||
msg = await client.receive_json()
|
||||
|
||||
assert msg["id"] == 1
|
||||
assert msg["success"]
|
||||
assert msg["result"] == {"hardware": []}
|
||||
Reference in New Issue
Block a user