diff --git a/.github/workflows/samples-python-nextgen-client-echo-api.yaml b/.github/workflows/samples-python-nextgen-client-echo-api.yaml index 4744dd1e1017..095d034572f5 100644 --- a/.github/workflows/samples-python-nextgen-client-echo-api.yaml +++ b/.github/workflows/samples-python-nextgen-client-echo-api.yaml @@ -21,7 +21,7 @@ jobs: - "3.8" - "3.9" - "3.10" - #- "3.11" + - "3.11" steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 diff --git a/.github/workflows/samples-python-petstore.yaml b/.github/workflows/samples-python-petstore.yaml index 9d8e01d5b0fe..21c80cc42db6 100644 --- a/.github/workflows/samples-python-petstore.yaml +++ b/.github/workflows/samples-python-petstore.yaml @@ -19,7 +19,7 @@ jobs: - "3.8" - "3.9" - "3.10" - #- "3.11" + - "3.11" sample: - samples/openapi3/client/petstore/python-aiohttp - samples/openapi3/client/petstore/python diff --git a/samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py b/samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py index a3356a723490..25064d4a9558 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py @@ -70,12 +70,17 @@ class TestPetApiTests(unittest.TestCase): async def test_async_with_result(self): await self.pet_api.add_pet(self.pet) - calls = [self.pet_api.get_pet_by_id(self.pet.id), - self.pet_api.get_pet_by_id(self.pet.id)] + tasks = [ + asyncio.create_task(coro) + for coro in [ + self.pet_api.get_pet_by_id(self.pet.id), + self.pet_api.get_pet_by_id(self.pet.id), + ] + ] - responses, _ = await asyncio.wait(calls) + responses = await asyncio.gather(*tasks) for response in responses: - self.assertEqual(response.result().id, self.pet.id) + self.assertEqual(response.id, self.pet.id) self.assertEqual(len(responses), 2) @async_test