Intents package combines sentences/responses per language (#109079)
This commit is contained in:
parent
a1f36c25d4
commit
9752e70675
10 changed files with 107 additions and 119 deletions
|
@ -581,6 +581,7 @@ async def test_http_api_no_match(
|
|||
|
||||
assert data == snapshot
|
||||
assert data["response"]["response_type"] == "error"
|
||||
assert data["response"]["data"]["code"] == "no_intent_match"
|
||||
|
||||
|
||||
async def test_http_api_handle_failure(
|
||||
|
@ -738,6 +739,7 @@ async def test_ws_api(
|
|||
|
||||
assert msg["success"]
|
||||
assert msg["result"] == snapshot
|
||||
assert msg["result"]["response"]["data"]["code"] == "no_intent_match"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("agent_id", AGENT_ID_OPTIONS)
|
||||
|
@ -1180,7 +1182,7 @@ async def test_ws_hass_agent_debug(
|
|||
"turn my cool light off",
|
||||
"turn on all lights in the kitchen",
|
||||
"how many lights are on in the kitchen?",
|
||||
"this will not match anything", # unmatched in results
|
||||
"this will not match anything", # None in results
|
||||
],
|
||||
}
|
||||
)
|
||||
|
@ -1190,6 +1192,9 @@ async def test_ws_hass_agent_debug(
|
|||
assert msg["success"]
|
||||
assert msg["result"] == snapshot
|
||||
|
||||
# Last sentence should be a failed match
|
||||
assert msg["result"]["results"][-1] is None
|
||||
|
||||
# Light state should not have been changed
|
||||
assert len(on_calls) == 0
|
||||
assert len(off_calls) == 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue