mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 19:57:03 -04:00
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
19 lines
713 B
Python
19 lines
713 B
Python
"""Tests for the Debug console integration setup."""
|
|
|
|
from pytest_homeassistant.typing import WebSocketGenerator
|
|
|
|
from homeassistant.components.debug_console.const import DOMAIN
|
|
from homeassistant.core import HomeAssistant
|
|
from homeassistant.setup import async_setup_component
|
|
|
|
|
|
async def test_setup(hass: HomeAssistant, hass_ws_client: WebSocketGenerator) -> None:
|
|
"""Test the console is set up from YAML, asking for the warning first."""
|
|
assert await async_setup_component(hass, DOMAIN, {DOMAIN: {}})
|
|
client = await hass_ws_client(hass)
|
|
|
|
await client.send_json_auto_id({"type": "debug_console/info"})
|
|
msg = await client.receive_json()
|
|
|
|
assert msg["result"] == {"warning_required": True}
|