File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
tests/core/entity_parsing/test_entity_fields Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments