def test_send_menu(self, mock_send_action, mock_send_generic_message): handle_quick_reply(recipient_id=self.bot_user.messenger_id, quick_reply_message=self.main_menu_quick_reply) # assert that send_action is called only once self.assertEqual(mock_send_action.call_count, 1) # assert that the send_generic_message is called only once self.assertEqual(mock_send_generic_message.call_count, 1)
def test_handle_language_code_post_quick_reply(self, mock_send_action, mock_send_message): handle_quick_reply(recipient_id=self.bot_user.messenger_id, quick_reply_message=self.language_code_quick_reply) # assert that the send_action is called only once self.assertEqual(mock_send_action.call_count, 1) # assert that the send_message is called only once self.assertEqual(mock_send_message.call_count, 1)
def test_programming_multiple_answer_quick_reply(self, mock_send_action, mock_send_message): handle_quick_reply(recipient_id=self.bot_user.messenger_id, quick_reply_message=self.programming_multiple_answer_quick_reply) # assert that send_action is called only once self.assertEqual(mock_send_action.call_count, 1) # assert that send_message is called only once self.assertEqual(mock_send_message.call_count, 1)
def test_handle_programming_questions_quick_reply(self, mock_send_action, mock_send_button_message): handle_quick_reply(recipient_id=self.bot_user.messenger_id, quick_reply_message=self.programming_questions_quick_reply) # Assert send_action is called only once self.assertEqual(mock_send_action.call_count, 1) # Assert send_button_message is called only once self.assertEqual(mock_send_button_message.call_count, 1)
def test_handle_category_id_quick_reply(self, mock_send_action, mock_send_text_message, mock_send_generic_message): handle_quick_reply(recipient_id=self.bot_user.messenger_id, quick_reply_message=self.category_id_quick_reply) self.assertEqual(mock_send_action.call_count, 1) self.assertEqual(mock_send_generic_message.call_count, 1) self.assertEqual(mock_send_text_message.call_count, 1)