Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python] Close test API clients #20393

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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()
wing328 marked this conversation as resolved.
Show resolved Hide resolved
{{/asyncio}}
{{^asyncio}}
def setUp(self) -> None:
self.api = {{classname}}()

def tearDown(self) -> None:
pass
self.api.api_client.close()
{{/asyncio}}

{{#operation}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = AnotherFakeApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_call_123_test_special_tags(self) -> None:
"""Test case for call_123_test_special_tags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = DefaultApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_foo_get(self) -> None:
"""Test case for foo_get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = FakeApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_fake_any_type_request_body(self) -> None:
"""Test case for fake_any_type_request_body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = FakeClassnameTags123Api()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_test_classname(self) -> None:
"""Test case for test_classname
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = ImportTestDatetimeApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_import_test_return_datetime(self) -> None:
"""Test case for import_test_return_datetime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = PetApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_add_pet(self) -> None:
"""Test case for add_pet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = StoreApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_delete_order(self) -> None:
"""Test case for delete_order
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = UserApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_create_user(self) -> None:
"""Test case for create_user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = AnotherFakeApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_call_123_test_special_tags(self) -> None:
"""Test case for call_123_test_special_tags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = DefaultApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_foo_get(self) -> None:
"""Test case for foo_get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = FakeApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_fake_any_type_request_body(self) -> None:
"""Test case for fake_any_type_request_body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = FakeClassnameTags123Api()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_test_classname(self) -> None:
"""Test case for test_classname
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = ImportTestDatetimeApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_import_test_return_datetime(self) -> None:
"""Test case for import_test_return_datetime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = PetApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_add_pet(self) -> None:
"""Test case for add_pet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = StoreApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_delete_order(self) -> None:
"""Test case for delete_order
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def asyncSetUp(self) -> None:
self.api = UserApi()

async def asyncTearDown(self) -> None:
pass
await self.api.api_client.close()

async def test_create_user(self) -> None:
"""Test case for create_user
Expand Down
Loading