mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 02:12:45 +00:00
Support for python 3.7 by renaming async to async_req (#519)
* feat: support for python 3.7 * fix: regenerate other sample clients
This commit is contained in:
committed by
William Cheng
parent
71ef6a0a2b
commit
8867d2b34c
@@ -140,19 +140,19 @@ class PetApiTests(unittest.TestCase):
|
||||
self.assertNotEqual(pet_api.api_client.configuration.host, pet_api2.api_client.configuration.host)
|
||||
|
||||
def test_async_request(self):
|
||||
thread = self.pet_api.add_pet(self.pet, async=True)
|
||||
thread = self.pet_api.add_pet(self.pet, async_req=True)
|
||||
response = thread.get()
|
||||
self.assertIsNone(response)
|
||||
|
||||
thread = self.pet_api.get_pet_by_id(self.pet.id, async=True)
|
||||
thread = self.pet_api.get_pet_by_id(self.pet.id, async_req=True)
|
||||
result = thread.get()
|
||||
self.assertIsInstance(result, petstore_api.Pet)
|
||||
|
||||
def test_async_with_result(self):
|
||||
self.pet_api.add_pet(self.pet, async=False)
|
||||
self.pet_api.add_pet(self.pet, async_req=False)
|
||||
|
||||
thread = self.pet_api.get_pet_by_id(self.pet.id, async=True)
|
||||
thread2 = self.pet_api.get_pet_by_id(self.pet.id, async=True)
|
||||
thread = self.pet_api.get_pet_by_id(self.pet.id, async_req=True)
|
||||
thread2 = self.pet_api.get_pet_by_id(self.pet.id, async_req=True)
|
||||
|
||||
response = thread.get()
|
||||
response2 = thread2.get()
|
||||
@@ -163,7 +163,7 @@ class PetApiTests(unittest.TestCase):
|
||||
def test_async_with_http_info(self):
|
||||
self.pet_api.add_pet(self.pet)
|
||||
|
||||
thread = self.pet_api.get_pet_by_id_with_http_info(self.pet.id, async=True)
|
||||
thread = self.pet_api.get_pet_by_id_with_http_info(self.pet.id, async_req=True)
|
||||
data, status, headers = thread.get()
|
||||
|
||||
self.assertIsInstance(data, petstore_api.Pet)
|
||||
@@ -172,7 +172,7 @@ class PetApiTests(unittest.TestCase):
|
||||
def test_async_exception(self):
|
||||
self.pet_api.add_pet(self.pet)
|
||||
|
||||
thread = self.pet_api.get_pet_by_id("-9999999999999", async=True)
|
||||
thread = self.pet_api.get_pet_by_id("-9999999999999", async_req=True)
|
||||
|
||||
exception = None
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user