diff --git a/snips_nlu/tests/test_deterministic_intent_parser.py b/snips_nlu/tests/test_deterministic_intent_parser.py index 7a0def5f0..0353dca7a 100644 --- a/snips_nlu/tests/test_deterministic_intent_parser.py +++ b/snips_nlu/tests/test_deterministic_intent_parser.py @@ -135,15 +135,17 @@ def test_should_parse_top_intents(self): results = parser.parse(text, top_n=3) # Then + slot = { + "entity": "snips/datetime", + "range": {"end": 16, "start": 8}, + "slotName": "time", + "value": "tomorrow" + } expected_results = [ extraction_result(intent_classification_result( intent_name="intent1", probability=0.5), []), extraction_result(intent_classification_result( - intent_name="intent2", probability=0.5), - [{"entity": "snips/datetime", - "range": {"end": 16, "start": 8}, - "slotName": "time", - "value": "tomorrow"}]) + intent_name="intent2", probability=0.5), [slot]) ] expected_results = sorted(expected_results, key=lambda r: r[RES_INTENT][RES_INTENT_NAME])