William Cheng 85c81bee5b
[python] Close test API clients (#20400)
* close api client

* update samples

* update python pydantic v1 test files

* update python disallow additional property tests

* update python tests

* update python tests

* update python aiohttp tests

* update python pydantic aiohttp tests

* update python pydantic v1 tests

* revert sync teardown

* update python disallow tests

* update FILES

* update python echo api tests

* update python tests

---------

Co-authored-by: Huan-Cheng Chang <changhc84@gmail.com>
2025-01-04 17:08:29 +08:00

70 lines
1.7 KiB
Python

# coding: utf-8
"""
Echo Server API
Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from openapi_client.models.pet import Pet
class TestPet(unittest.TestCase):
"""Pet unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> Pet:
"""Test Pet
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `Pet`
"""
model = Pet()
if include_optional:
return Pet(
id = 10,
name = 'doggie',
category = openapi_client.models.category.Category(
id = 1,
name = 'Dogs', ),
photo_urls = [
''
],
tags = [
openapi_client.models.tag.Tag(
id = 56,
name = '', )
],
status = 'available'
)
else:
return Pet(
name = 'doggie',
photo_urls = [
''
],
)
"""
def testPet(self):
"""Test Pet"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()