From b37fe34a1cb2977e7e36c6988e8dae6956a0ae4c Mon Sep 17 00:00:00 2001 From: Huan-Cheng Chang Date: Wed, 1 Jan 2025 00:15:35 +0000 Subject: [PATCH] close api client --- .../src/main/resources/python-pydantic-v1/api_test.mustache | 4 ++-- .../src/main/resources/python/api_test.mustache | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python-pydantic-v1/api_test.mustache b/modules/openapi-generator/src/main/resources/python-pydantic-v1/api_test.mustache index 10a4d3ed5aa0..a758be5210a7 100644 --- a/modules/openapi-generator/src/main/resources/python-pydantic-v1/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/python-pydantic-v1/api_test.mustache @@ -15,14 +15,14 @@ class {{#operations}}Test{{classname}}(unittest.{{#asyncio}}IsolatedAsyncio{{/as self.api = {{classname}}() async def asyncTearDown(self) -> None: - pass + await self.api.api_client.close() {{/asyncio}} {{^asyncio}} def setUp(self) -> None: self.api = {{classname}}() def tearDown(self) -> None: - pass + self.api.api_client.close() {{/asyncio}} {{#operation}} diff --git a/modules/openapi-generator/src/main/resources/python/api_test.mustache b/modules/openapi-generator/src/main/resources/python/api_test.mustache index 963d085af18e..d7cdc0ee18e2 100644 --- a/modules/openapi-generator/src/main/resources/python/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_test.mustache @@ -15,14 +15,14 @@ class {{#operations}}Test{{classname}}(unittest.{{#asyncio}}IsolatedAsyncio{{/as self.api = {{classname}}() async def asyncTearDown(self) -> None: - pass + await self.api.api_client.close() {{/asyncio}} {{^asyncio}} def setUp(self) -> None: self.api = {{classname}}() def tearDown(self) -> None: - pass + self.api.api_client.close() {{/asyncio}} {{#operation}}