Use send_json_auto_id in conversation tests (#109354)
parent
0c3541c194
commit
9d22f07fc6
|
@ -733,7 +733,7 @@ async def test_ws_api(
|
|||
assert await async_setup_component(hass, "conversation", {})
|
||||
client = await hass_ws_client(hass)
|
||||
|
||||
await client.send_json({"id": 5, "type": "conversation/process", **payload})
|
||||
await client.send_json_auto_id({"type": "conversation/process", **payload})
|
||||
|
||||
msg = await client.receive_json()
|
||||
|
||||
|
@ -757,18 +757,14 @@ async def test_ws_prepare(
|
|||
|
||||
client = await hass_ws_client(hass)
|
||||
|
||||
msg = {
|
||||
"id": 5,
|
||||
"type": "conversation/prepare",
|
||||
}
|
||||
msg = {"type": "conversation/prepare"}
|
||||
if agent_id is not None:
|
||||
msg["agent_id"] = agent_id
|
||||
await client.send_json(msg)
|
||||
await client.send_json_auto_id(msg)
|
||||
|
||||
msg = await client.receive_json()
|
||||
|
||||
assert msg["success"]
|
||||
assert msg["id"] == 5
|
||||
|
||||
# Intents should now be load
|
||||
assert agent._lang_intents.get(hass.config.language)
|
||||
|
|
|
@ -105,9 +105,8 @@ async def test_subscribe_trigger_does_not_interfere_with_responses(
|
|||
) -> None:
|
||||
"""Test that subscribing to a trigger from the websocket API does not interfere with responses."""
|
||||
websocket_client = await hass_ws_client()
|
||||
await websocket_client.send_json(
|
||||
await websocket_client.send_json_auto_id(
|
||||
{
|
||||
"id": 5,
|
||||
"type": "subscribe_trigger",
|
||||
"trigger": {"platform": "conversation", "command": ["test sentence"]},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue