Example #1
0
    def test_parse_message_failure(self):
        for test in self.failure_test_params:
            response = chatbot.parse_message(test[KEY_INPUT])
            expected = test[KEY_EXPECTED]

            # TODO add assertNotEqual cases here instead
            self.assertEqual(True, True)
Example #2
0
 def test_parse_message_success(self):
     for test in self.success_test_params:
         response = chatbot.parse_message(test[KEY_INPUT])
         expected = test[KEY_EXPECTED]
         
         self.assertEqual(response[KEY_IS_BOT], expected[KEY_IS_BOT])
         self.assertEqual(response[KEY_BOT_COMMAND], expected[KEY_BOT_COMMAND])
         self.assertEqual(response[KEY_MESSAGE], expected[KEY_MESSAGE])
Example #3
0
 def test_parse_message_failure(self):
     for test in self.failure_test_params:
         response = chatbot.parse_message(test[KEY_INPUT])
         expected = test[KEY_EXPECTED]
         
         # TODO add assertNotEqual cases here instead
         self.assertNotEqual(response[KEY_IS_BOT], expected[KEY_IS_BOT])
         self.assertNotEqual(response[KEY_BOT_COMMAND], expected[KEY_BOT_COMMAND])
         self.assertNotEqual(response[KEY_MESSAGE], expected[KEY_MESSAGE])
Example #4
0
    def test_parse_message_success(self):
        for test in self.success_test_params:
            response = chatbot.parse_message(test[KEY_INPUT])
            expected = test[KEY_EXPECTED]

            #self.assertEqual(response[KEY_IS_BOT], expected[KEY_IS_BOT])
            #self.assertEqual(response[KEY_BOT_COMMAND], expected[KEY_BOT_COMMAND])
            #self.assertEqual(response[KEY_MESSAGE], expected[KEY_MESSAGE])
            # Alternatively (and preferably), you can do self.assertDictEqual(response, expected)
            self.assertDictEqual(response, expected)
Example #5
0
    def test_parse_message_failure(self):
        for test in self.failure_test_params:
            response = chatbot.parse_message(test[KEY_INPUT])
            expected = test[KEY_EXPECTED]

            self.assertNotEqual(response[KEY_IS_BOT], expected[KEY_IS_BOT])
            self.assertNotEqual(response[KEY_BOT_COMMAND],
                                expected[KEY_BOT_COMMAND])
            self.assertNotEqual(response[KEY_MESSAGE], expected[KEY_MESSAGE])


# if __name__ == '__main__':
#     unittest.main()
Example #6
0
    def test_parse_message_failure(self):
        for test in self.failure_test_params:
            response = chatbot.parse_message(test[KEY_INPUT])
            expected = test[KEY_EXPECTED]

            self.assertNotEqual(response[KEY_MESSAGE], expected[KEY_MESSAGE])