add test case for pet api method with http info returned;

This commit is contained in:
zhenjun115 2016-06-19 21:44:12 +08:00
parent 86c8647ace
commit 8180a46a35

View File

@ -127,11 +127,11 @@ class PetApiTests(unittest.TestCase):
def callback_function(data): def callback_function(data):
#fetched = self.pet_api.get_pet_by_id_with_http_info(pet_id=self.pet.id) #fetched = self.pet_api.get_pet_by_id_with_http_info(pet_id=self.pet.id)
self.assertIsNotNone(data) self.assertIsNotNone(data)
self.assertEqual(self.pet.id, data.id) self.assertEqual(self.pet.id, data[0].id)
self.assertIsNotNone(data.category) self.assertIsNotNone(data[0].category)
self.assertEqual(self.pet.category.name, data.category.name) self.assertEqual(self.pet.category.name, data[0].category.name)
thread = self.pet_api.get_pet_by_id(pet_id=self.pet.id, callback=callback_function) thread = self.pet_api.get_pet_by_id_with_http_info(pet_id=self.pet.id, callback=callback_function)
thread.join(10) thread.join(10)
if thread.isAlive(): if thread.isAlive():
self.fail("Request timeout") self.fail("Request timeout")