Skip to content

Commit df8f4ed

Browse files
committed
#68 - new unit test to assert functionality after bugfix
1 parent 4b2a011 commit df8f4ed

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/core/entity_parsing/test_entity_fields/test_entity_parsing.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,22 @@ class IntentClass(ImplementedTestIntent):
345345

346346
is_break = BoolEntityField(message_contains=("break",))
347347
is_workshift = BoolEntityField(message_contains=("workshift",))
348+
349+
350+
class PyttmanIntentInternalTestTextEntityDefault(
351+
PyttmanInternalTestBaseCase
352+
):
353+
mock_message = Message("I would like the blue cheese, please.")
354+
process_message = True
355+
expected_entities = {
356+
"cheese_type": ["blue"],
357+
}
358+
359+
class IntentClass(ImplementedTestIntent):
360+
"""
361+
Tests that the 'workshift' from 'lead' is not removed
362+
from parsing, and can be used as entities.
363+
"""
364+
cheese_type = StringEntityField(valid_strings=("blue", "yellow"),
365+
default="blue",
366+
as_list=True)

0 commit comments

Comments
 (0)