Ejemplo n.º 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)
Ejemplo n.º 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])
Ejemplo n.º 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])
Ejemplo n.º 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)
Ejemplo n.º 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()
Ejemplo n.º 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])