def test_should_return_suggested_actions(self):
     activity = MessageFactory.suggested_actions(self.suggested_actions)
     assert_message(activity)
     assert (activity.suggested_actions is not None
             and activity.suggested_actions.actions
             is not None), "actions not returned"
     assert_actions(activity.suggested_actions.actions, 3, ["a", "b", "c"])
 def test_should_return_suggested_actions_with_text(self):
     activity = MessageFactory.suggested_actions(self.suggested_actions,
                                                 'test1')
     assert_message(activity)
     assert activity.suggested_actions is not None and \
         activity.suggested_actions.actions is not None, 'actions not returned'
     assert_actions(activity.suggested_actions.actions, 3, ['a', 'b', 'c'])
     assert activity.text == 'test1', 'invalid text field.'
 def test_should_return_suggested_actions_with_text(self):
     activity = MessageFactory.suggested_actions(self.suggested_actions,
                                                 "test1")
     assert_message(activity)
     assert (activity.suggested_actions is not None
             and activity.suggested_actions.actions
             is not None), "actions not returned"
     assert_actions(activity.suggested_actions.actions, 3, ["a", "b", "c"])
     assert activity.text == "test1", "invalid text field."
 def suggested_action(choices: List[Choice],
                      text: str = None,
                      speak: str = None) -> Activity:
     # Return activity with choices as suggested actions
     return MessageFactory.suggested_actions(
         ChoiceFactory._extract_actions(choices),
         text,
         speak,
         InputHints.expecting_input,
     )
 def test_should_return_suggested_actions_with_text_speak_and_input_hint(
         self):
     activity = MessageFactory.suggested_actions(self.suggested_actions,
                                                 'test1', 'test2',
                                                 InputHints.ignoring_input)
     assert_message(activity)
     assert activity.suggested_actions is not None and \
         activity.suggested_actions.actions is not None, 'actions not returned'
     assert_actions(activity.suggested_actions.actions, 3, ['a', 'b', 'c'])
     assert activity.text == 'test1', 'invalid text field.'
     assert activity.speak == 'test2', 'invalid speak field.'
     assert activity.input_hint == InputHints.ignoring_input, 'invalid input_hint field.'
 def suggested_action(choices: List[Choice],
                      text: str = None,
                      speak: str = None) -> Activity:
     """
     Creates a message activity that includes a list of choices that have been added as suggested actions.
     """
     # Return activity with choices as suggested actions
     return MessageFactory.suggested_actions(
         ChoiceFactory._extract_actions(choices),
         text,
         speak,
         InputHints.expecting_input,
     )
 def test_should_return_suggested_actions_with_text_speak_and_input_hint(
         self):
     activity = MessageFactory.suggested_actions(self.suggested_actions,
                                                 "test1", "test2",
                                                 InputHints.ignoring_input)
     assert_message(activity)
     assert (activity.suggested_actions is not None
             and activity.suggested_actions.actions
             is not None), "actions not returned"
     assert_actions(activity.suggested_actions.actions, 3, ["a", "b", "c"])
     assert activity.text == "test1", "invalid text field."
     assert activity.speak == "test2", "invalid speak field."
     assert (activity.input_hint == InputHints.ignoring_input
             ), "invalid input_hint field."
 def test_should_return_suggested_actions(self):
     activity = MessageFactory.suggested_actions(self.suggested_actions)
     assert_message(activity)
     assert activity.suggested_actions is not None and \
         activity.suggested_actions.actions is not None, 'actions not returned'
     assert_actions(activity.suggested_actions.actions, 3, ['a', 'b', 'c'])