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)
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])
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])
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)
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()
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])