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 10a4d3ed5aa..a758be5210a 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 963d085af18..2febe56956c 100644 --- a/modules/openapi-generator/src/main/resources/python/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_test.mustache @@ -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: diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_auth_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_auth_api.py index bfd827933bd..47756f74604 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_auth_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_auth_api.py @@ -15,14 +15,14 @@ import unittest -from openapi_client.api.auth_api import AuthApi # noqa: E501 +from openapi_client.api.auth_api import AuthApi class TestAuthApi(unittest.TestCase): """AuthApi unit test stubs""" def setUp(self) -> None: - self.api = AuthApi() # noqa: E501 + self.api = AuthApi() def tearDown(self) -> None: pass @@ -30,7 +30,14 @@ class TestAuthApi(unittest.TestCase): def test_test_auth_http_basic(self) -> None: """Test case for test_auth_http_basic - To test HTTP basic authentication # noqa: E501 + To test HTTP basic authentication + """ + pass + + def test_test_auth_http_bearer(self) -> None: + """Test case for test_auth_http_bearer + + To test HTTP bearer authentication """ pass diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_bird.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_bird.py index d95a104d714..1a2289c0d47 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_bird.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_bird.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.bird import Bird # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.bird import Bird class TestBird(unittest.TestCase): """Bird unit test stubs""" @@ -29,20 +26,20 @@ class TestBird(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Bird: """Test Bird - include_option is a boolean, when False only required + 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 `Bird` """ - model = openapi_client.models.bird.Bird() # noqa: E501 - if include_optional : + model = Bird() + if include_optional: return Bird( - size = '', + size = '', color = '' ) - else : + else: return Bird( ) """ diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_body_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_body_api.py index e5e24ace810..f9b7917ee00 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_body_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_body_api.py @@ -3,36 +3,97 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client -from openapi_client.api.body_api import BodyApi # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.api.body_api import BodyApi class TestBodyApi(unittest.TestCase): """BodyApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.body_api.BodyApi() # noqa: E501 + def setUp(self) -> None: + self.api = BodyApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_test_echo_body_pet(self): + def test_test_binary_gif(self) -> None: + """Test case for test_binary_gif + + Test binary (gif) response body + """ + pass + + def test_test_body_application_octetstream_binary(self) -> None: + """Test case for test_body_application_octetstream_binary + + Test body parameter(s) + """ + pass + + def test_test_body_multipart_formdata_array_of_binary(self) -> None: + """Test case for test_body_multipart_formdata_array_of_binary + + Test array of binary in multipart mime + """ + pass + + def test_test_body_multipart_formdata_single_binary(self) -> None: + """Test case for test_body_multipart_formdata_single_binary + + Test single binary in multipart mime + """ + pass + + def test_test_echo_body_all_of_pet(self) -> None: + """Test case for test_echo_body_all_of_pet + + Test body parameter(s) + """ + pass + + def test_test_echo_body_free_form_object_response_string(self) -> None: + """Test case for test_echo_body_free_form_object_response_string + + Test free form object + """ + pass + + def test_test_echo_body_pet(self) -> None: """Test case for test_echo_body_pet - Test body parameter(s) # noqa: E501 + Test body parameter(s) + """ + pass + + def test_test_echo_body_pet_response_string(self) -> None: + """Test case for test_echo_body_pet_response_string + + Test empty response body + """ + pass + + def test_test_echo_body_string_enum(self) -> None: + """Test case for test_echo_body_string_enum + + Test string enum response body + """ + pass + + def test_test_echo_body_tag_response_string(self) -> None: + """Test case for test_echo_body_tag_response_string + + Test empty json (request body) """ pass diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_category.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_category.py index b5771c572d3..12dfe19f63a 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_category.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_category.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.category import Category # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.category import Category class TestCategory(unittest.TestCase): """Category unit test stubs""" @@ -29,20 +26,20 @@ class TestCategory(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Category: """Test Category - include_option is a boolean, when False only required + 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 `Category` """ - model = openapi_client.models.category.Category() # noqa: E501 - if include_optional : + model = Category() + if include_optional: return Category( - id = 1, + id = 1, name = 'Dogs' ) - else : + else: return Category( ) """ diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_data_query.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_data_query.py index f33d8daabae..fcd7c9566a3 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_data_query.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_data_query.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.data_query import DataQuery # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.data_query import DataQuery class TestDataQuery(unittest.TestCase): """DataQuery unit test stubs""" @@ -29,21 +26,21 @@ class TestDataQuery(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DataQuery: """Test DataQuery - include_option is a boolean, when False only required + 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 `DataQuery` """ - model = openapi_client.models.data_query.DataQuery() # noqa: E501 - if include_optional : + model = DataQuery() + if include_optional: return DataQuery( - suffix = '', - text = 'Some text', + suffix = '', + text = 'Some text', var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) - else : + else: return DataQuery( ) """ diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_default_value.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_default_value.py index 6e5f35fd2ef..4bdc4944886 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_default_value.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_default_value.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.default_value import DefaultValue # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.default_value import DefaultValue class TestDefaultValue(unittest.TestCase): """DefaultValue unit test stubs""" @@ -29,34 +26,40 @@ class TestDefaultValue(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DefaultValue: """Test DefaultValue - include_option is a boolean, when False only required + 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 `DefaultValue` """ - model = openapi_client.models.default_value.DefaultValue() # noqa: E501 - if include_optional : + model = DefaultValue() + if include_optional: return DefaultValue( + array_string_enum_ref_default = [ + 'success' + ], array_string_enum_default = [ 'success' - ], + ], array_string_default = [ '' - ], + ], array_integer_default = [ 56 - ], + ], array_string = [ '' - ], + ], array_string_nullable = [ '' - ], + ], + array_string_extension_nullable = [ + '' + ], string_nullable = '' ) - else : + else: return DefaultValue( ) """ diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_form_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_form_api.py index 6422432c79b..fbd7ed641e6 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_form_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_form_api.py @@ -3,36 +3,48 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client -from openapi_client.api.form_api import FormApi # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.api.form_api import FormApi class TestFormApi(unittest.TestCase): """FormApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.form_api.FormApi() # noqa: E501 + def setUp(self) -> None: + self.api = FormApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_test_form_integer_boolean_string(self): + def test_test_form_integer_boolean_string(self) -> None: """Test case for test_form_integer_boolean_string - Test form parameter(s) # noqa: E501 + Test form parameter(s) + """ + pass + + def test_test_form_object_multipart(self) -> None: + """Test case for test_form_object_multipart + + Test form parameter(s) for multipart schema + """ + pass + + def test_test_form_oneof(self) -> None: + """Test case for test_form_oneof + + Test form parameter(s) for oneOf schema """ pass diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_header_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_header_api.py index c1b7ed44e8f..68670ebc567 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_header_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_header_api.py @@ -3,36 +3,34 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client -from openapi_client.api.header_api import HeaderApi # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.api.header_api import HeaderApi class TestHeaderApi(unittest.TestCase): """HeaderApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.header_api.HeaderApi() # noqa: E501 + def setUp(self) -> None: + self.api = HeaderApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_test_header_integer_boolean_string(self): - """Test case for test_header_integer_boolean_string + def test_test_header_integer_boolean_string_enums(self) -> None: + """Test case for test_header_integer_boolean_string_enums - Test header parameter(s) # noqa: E501 + Test header parameter(s) """ pass diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_number_properties_only.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_number_properties_only.py index 68aa757f9df..682503a0cbf 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_number_properties_only.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_number_properties_only.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + 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 -import datetime -import openapi_client -from openapi_client.models.number_properties_only import NumberPropertiesOnly # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.number_properties_only import NumberPropertiesOnly class TestNumberPropertiesOnly(unittest.TestCase): """NumberPropertiesOnly unit test stubs""" @@ -29,21 +26,21 @@ class TestNumberPropertiesOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NumberPropertiesOnly: """Test NumberPropertiesOnly - include_option is a boolean, when False only required + 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 `NumberPropertiesOnly` """ - model = openapi_client.models.number_properties_only.NumberPropertiesOnly() # noqa: E501 - if include_optional : + model = NumberPropertiesOnly() + if include_optional: return NumberPropertiesOnly( - number = 1.337, - float = 1.337, - double = '' + number = 1.337, + var_float = 1.337, + double = 0.8 ) - else : + else: return NumberPropertiesOnly( ) """ diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_path_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_path_api.py index 4d8e71f7ce6..faabe210242 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_path_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_path_api.py @@ -3,36 +3,34 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client -from openapi_client.api.path_api import PathApi # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.api.path_api import PathApi class TestPathApi(unittest.TestCase): """PathApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.path_api.PathApi() # noqa: E501 + def setUp(self) -> None: + self.api = PathApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_tests_path_string_path_string_integer_path_integer(self): - """Test case for tests_path_string_path_string_integer_path_integer + def test_tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path(self) -> None: + """Test case for tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path - Test path parameter(s) # noqa: E501 + Test path parameter(s) """ pass diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_pet.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_pet.py index e02d8615bc0..21965554b26 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_pet.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_pet.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.pet import Pet # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.pet import Pet class TestPet(unittest.TestCase): """Pet unit test stubs""" @@ -29,32 +26,32 @@ class TestPet(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Pet: """Test Pet - include_option is a boolean, when False only required + 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 = openapi_client.models.pet.Pet() # noqa: E501 - if include_optional : + model = Pet() + if include_optional: return Pet( - id = 10, - name = 'doggie', + id = 10, + name = 'doggie', category = openapi_client.models.category.Category( id = 1, - name = 'Dogs', ), + name = 'Dogs', ), photo_urls = [ '' - ], + ], tags = [ openapi_client.models.tag.Tag( id = 56, name = '', ) - ], + ], status = 'available' ) - else : + else: return Pet( name = 'doggie', photo_urls = [ diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_query.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_query.py index a7652e1ae59..c3d033ef0b5 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_query.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_query.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.query import Query # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.query import Query class TestQuery(unittest.TestCase): """Query unit test stubs""" @@ -29,22 +26,22 @@ class TestQuery(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Query: """Test Query - include_option is a boolean, when False only required + 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 `Query` """ - model = openapi_client.models.query.Query() # noqa: E501 - if include_optional : + model = Query() + if include_optional: return Query( - id = 56, + id = 56, outcomes = [ 'SUCCESS' ] ) - else : + else: return Query( ) """ diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_query_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_query_api.py index 829a635d99b..e2e6c2dac46 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_query_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_query_api.py @@ -3,50 +3,97 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client -from openapi_client.api.query_api import QueryApi # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.api.query_api import QueryApi class TestQueryApi(unittest.TestCase): """QueryApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.query_api.QueryApi() # noqa: E501 + def setUp(self) -> None: + self.api = QueryApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_test_query_integer_boolean_string(self): + def test_test_enum_ref_string(self) -> None: + """Test case for test_enum_ref_string + + Test query parameter(s) + """ + pass + + def test_test_query_datetime_date_string(self) -> None: + """Test case for test_query_datetime_date_string + + Test query parameter(s) + """ + pass + + def test_test_query_integer_boolean_string(self) -> None: """Test case for test_query_integer_boolean_string - Test query parameter(s) # noqa: E501 + Test query parameter(s) """ pass - def test_test_query_style_form_explode_true_array_string(self): + def test_test_query_style_deep_object_explode_true_object(self) -> None: + """Test case for test_query_style_deep_object_explode_true_object + + Test query parameter(s) + """ + pass + + def test_test_query_style_deep_object_explode_true_object_all_of(self) -> None: + """Test case for test_query_style_deep_object_explode_true_object_all_of + + Test query parameter(s) + """ + pass + + def test_test_query_style_form_explode_false_array_integer(self) -> None: + """Test case for test_query_style_form_explode_false_array_integer + + Test query parameter(s) + """ + pass + + def test_test_query_style_form_explode_false_array_string(self) -> None: + """Test case for test_query_style_form_explode_false_array_string + + Test query parameter(s) + """ + pass + + def test_test_query_style_form_explode_true_array_string(self) -> None: """Test case for test_query_style_form_explode_true_array_string - Test query parameter(s) # noqa: E501 + Test query parameter(s) """ pass - def test_test_query_style_form_explode_true_object(self): + def test_test_query_style_form_explode_true_object(self) -> None: """Test case for test_query_style_form_explode_true_object - Test query parameter(s) # noqa: E501 + Test query parameter(s) + """ + pass + + def test_test_query_style_form_explode_true_object_all_of(self) -> None: + """Test case for test_query_style_form_explode_true_object_all_of + + Test query parameter(s) """ pass diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_string_enum_ref.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_string_enum_ref.py index 60a3f0781b1..ece5b369cc2 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_string_enum_ref.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_string_enum_ref.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.string_enum_ref import StringEnumRef # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.string_enum_ref import StringEnumRef class TestStringEnumRef(unittest.TestCase): """StringEnumRef unit test stubs""" diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_tag.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_tag.py index 8e48170ab6a..7e235ac8b95 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_tag.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_tag.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.tag import Tag # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.tag import Tag class TestTag(unittest.TestCase): """Tag unit test stubs""" @@ -29,20 +26,20 @@ class TestTag(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Tag: """Test Tag - include_option is a boolean, when False only required + 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 `Tag` """ - model = openapi_client.models.tag.Tag() # noqa: E501 - if include_optional : + model = Tag() + if include_optional: return Tag( - id = 56, + id = 56, name = '' ) - else : + else: return Tag( ) """ diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_form_object_multipart_request_marker.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_form_object_multipart_request_marker.py index d4997428606..97f5600a234 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_form_object_multipart_request_marker.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_form_object_multipart_request_marker.py @@ -28,7 +28,7 @@ class TestTestFormObjectMultipartRequestMarker(unittest.TestCase): def make_instance(self, include_optional) -> TestFormObjectMultipartRequestMarker: """Test TestFormObjectMultipartRequestMarker - include_option is a boolean, when False only required + 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 `TestFormObjectMultipartRequestMarker` diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py index 39540734561..22731b578cc 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.test_query_style_deep_object_explode_true_object_all_of_query_object_parameter import TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.test_query_style_deep_object_explode_true_object_all_of_query_object_parameter import TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter class TestTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(unittest.TestCase): """TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter unit test stubs""" @@ -29,22 +26,22 @@ class TestTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(uni def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter: """Test TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter - include_option is a boolean, when False only required + 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 `TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter` """ - model = openapi_client.models.test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() # noqa: E501 - if include_optional : + model = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() + if include_optional: return TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter( - size = '', - color = '', - id = 1, + size = '', + color = '', + id = 1, name = 'Dogs' ) - else : + else: return TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter( ) """ diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_query_style_form_explode_true_array_integer_query_object_parameter.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_query_style_form_explode_true_array_integer_query_object_parameter.py deleted file mode 100644 index 2b35c46cb3f..00000000000 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_query_style_form_explode_true_array_integer_query_object_parameter.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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.test_query_style_form_explode_true_array_integer_query_object_parameter import TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter - -class TestTestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter(unittest.TestCase): - """TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter: - """Test TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter - include_option 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 `TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter` - """ - model = TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter() - if include_optional: - return TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter( - values = [ - 56 - ] - ) - else: - return TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter( - ) - """ - - def testTestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter(self): - """Test TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_query_style_form_explode_true_array_string_query_object_parameter.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_query_style_form_explode_true_array_string_query_object_parameter.py index 6366b5c2358..2656fbf8e02 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_query_style_form_explode_true_array_string_query_object_parameter.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test/test_test_query_style_form_explode_true_array_string_query_object_parameter.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.test_query_style_form_explode_true_array_string_query_object_parameter import TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.test_query_style_form_explode_true_array_string_query_object_parameter import TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter class TestTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(unittest.TestCase): """TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter unit test stubs""" @@ -29,21 +26,21 @@ class TestTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(unittest. def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter: """Test TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter - include_option is a boolean, when False only required + 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 `TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter` """ - model = openapi_client.models.test_query_style_form_explode_true_array_string_query_object_parameter.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() # noqa: E501 - if include_optional : + model = TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() + if include_optional: return TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter( values = [ '' ] ) - else : + else: return TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter( ) """ diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_auth_api.py b/samples/client/echo_api/python-pydantic-v1/test/test_auth_api.py index bfd827933bd..5c53a30e09c 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_auth_api.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_auth_api.py @@ -22,10 +22,10 @@ class TestAuthApi(unittest.TestCase): """AuthApi unit test stubs""" def setUp(self) -> None: - self.api = AuthApi() # noqa: E501 + self.api = AuthApi() def tearDown(self) -> None: - pass + self.api.api_client.close() def test_test_auth_http_basic(self) -> None: """Test case for test_auth_http_basic @@ -34,6 +34,13 @@ class TestAuthApi(unittest.TestCase): """ pass + def test_test_auth_http_bearer(self) -> None: + """Test case for test_auth_http_bearer + + To test HTTP bearer authentication # noqa: E501 + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_bird.py b/samples/client/echo_api/python-pydantic-v1/test/test_bird.py index d95a104d714..0ce8736bd8a 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_bird.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_bird.py @@ -3,22 +3,20 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import openapi_client from openapi_client.models.bird import Bird # noqa: E501 -from openapi_client.rest import ApiException class TestBird(unittest.TestCase): """Bird unit test stubs""" @@ -29,20 +27,20 @@ class TestBird(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Bird: """Test Bird include_option 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 `Bird` """ - model = openapi_client.models.bird.Bird() # noqa: E501 - if include_optional : + model = Bird() # noqa: E501 + if include_optional: return Bird( - size = '', + size = '', color = '' ) - else : + else: return Bird( ) """ diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_body_api.py b/samples/client/echo_api/python-pydantic-v1/test/test_body_api.py index e5e24ace810..6727be6c74c 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_body_api.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_body_api.py @@ -3,39 +3,100 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client from openapi_client.api.body_api import BodyApi # noqa: E501 -from openapi_client.rest import ApiException class TestBodyApi(unittest.TestCase): """BodyApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.body_api.BodyApi() # noqa: E501 + def setUp(self) -> None: + self.api = BodyApi() - def tearDown(self): + def tearDown(self) -> None: + self.api.api_client.close() + + def test_test_binary_gif(self) -> None: + """Test case for test_binary_gif + + Test binary (gif) response body # noqa: E501 + """ pass - def test_test_echo_body_pet(self): + def test_test_body_application_octetstream_binary(self) -> None: + """Test case for test_body_application_octetstream_binary + + Test body parameter(s) # noqa: E501 + """ + pass + + def test_test_body_multipart_formdata_array_of_binary(self) -> None: + """Test case for test_body_multipart_formdata_array_of_binary + + Test array of binary in multipart mime # noqa: E501 + """ + pass + + def test_test_body_multipart_formdata_single_binary(self) -> None: + """Test case for test_body_multipart_formdata_single_binary + + Test single binary in multipart mime # noqa: E501 + """ + pass + + def test_test_echo_body_all_of_pet(self) -> None: + """Test case for test_echo_body_all_of_pet + + Test body parameter(s) # noqa: E501 + """ + pass + + def test_test_echo_body_free_form_object_response_string(self) -> None: + """Test case for test_echo_body_free_form_object_response_string + + Test free form object # noqa: E501 + """ + pass + + def test_test_echo_body_pet(self) -> None: """Test case for test_echo_body_pet Test body parameter(s) # noqa: E501 """ pass + def test_test_echo_body_pet_response_string(self) -> None: + """Test case for test_echo_body_pet_response_string + + Test empty response body # noqa: E501 + """ + pass + + def test_test_echo_body_string_enum(self) -> None: + """Test case for test_echo_body_string_enum + + Test string enum response body # noqa: E501 + """ + pass + + def test_test_echo_body_tag_response_string(self) -> None: + """Test case for test_echo_body_tag_response_string + + Test empty json (request body) # noqa: E501 + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_category.py b/samples/client/echo_api/python-pydantic-v1/test/test_category.py index b5771c572d3..487e50d95d5 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_category.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_category.py @@ -3,22 +3,20 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import openapi_client from openapi_client.models.category import Category # noqa: E501 -from openapi_client.rest import ApiException class TestCategory(unittest.TestCase): """Category unit test stubs""" @@ -29,20 +27,20 @@ class TestCategory(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Category: """Test Category include_option 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 `Category` """ - model = openapi_client.models.category.Category() # noqa: E501 - if include_optional : + model = Category() # noqa: E501 + if include_optional: return Category( - id = 1, + id = 1, name = 'Dogs' ) - else : + else: return Category( ) """ diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_data_query.py b/samples/client/echo_api/python-pydantic-v1/test/test_data_query.py index f33d8daabae..5ae6bdbf877 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_data_query.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_data_query.py @@ -3,22 +3,20 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import openapi_client from openapi_client.models.data_query import DataQuery # noqa: E501 -from openapi_client.rest import ApiException class TestDataQuery(unittest.TestCase): """DataQuery unit test stubs""" @@ -29,21 +27,21 @@ class TestDataQuery(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DataQuery: """Test DataQuery include_option 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 `DataQuery` """ - model = openapi_client.models.data_query.DataQuery() # noqa: E501 - if include_optional : + model = DataQuery() # noqa: E501 + if include_optional: return DataQuery( - suffix = '', - text = 'Some text', + suffix = '', + text = 'Some text', var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) - else : + else: return DataQuery( ) """ diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_default_value.py b/samples/client/echo_api/python-pydantic-v1/test/test_default_value.py index 6e5f35fd2ef..a38f9d85c97 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_default_value.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_default_value.py @@ -3,22 +3,20 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import openapi_client from openapi_client.models.default_value import DefaultValue # noqa: E501 -from openapi_client.rest import ApiException class TestDefaultValue(unittest.TestCase): """DefaultValue unit test stubs""" @@ -29,34 +27,40 @@ class TestDefaultValue(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DefaultValue: """Test DefaultValue include_option 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 `DefaultValue` """ - model = openapi_client.models.default_value.DefaultValue() # noqa: E501 - if include_optional : + model = DefaultValue() # noqa: E501 + if include_optional: return DefaultValue( + array_string_enum_ref_default = [ + 'success' + ], array_string_enum_default = [ 'success' - ], + ], array_string_default = [ '' - ], + ], array_integer_default = [ 56 - ], + ], array_string = [ '' - ], + ], array_string_nullable = [ '' - ], + ], + array_string_extension_nullable = [ + '' + ], string_nullable = '' ) - else : + else: return DefaultValue( ) """ diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_form_api.py b/samples/client/echo_api/python-pydantic-v1/test/test_form_api.py index 6422432c79b..6c888452a47 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_form_api.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_form_api.py @@ -3,39 +3,51 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client from openapi_client.api.form_api import FormApi # noqa: E501 -from openapi_client.rest import ApiException class TestFormApi(unittest.TestCase): """FormApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.form_api.FormApi() # noqa: E501 + def setUp(self) -> None: + self.api = FormApi() - def tearDown(self): - pass + def tearDown(self) -> None: + self.api.api_client.close() - def test_test_form_integer_boolean_string(self): + def test_test_form_integer_boolean_string(self) -> None: """Test case for test_form_integer_boolean_string Test form parameter(s) # noqa: E501 """ pass + def test_test_form_object_multipart(self) -> None: + """Test case for test_form_object_multipart + + Test form parameter(s) for multipart schema # noqa: E501 + """ + pass + + def test_test_form_oneof(self) -> None: + """Test case for test_form_oneof + + Test form parameter(s) for oneOf schema # noqa: E501 + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_header_api.py b/samples/client/echo_api/python-pydantic-v1/test/test_header_api.py index c1b7ed44e8f..d9bcf17bfa1 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_header_api.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_header_api.py @@ -3,34 +3,32 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client from openapi_client.api.header_api import HeaderApi # noqa: E501 -from openapi_client.rest import ApiException class TestHeaderApi(unittest.TestCase): """HeaderApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.header_api.HeaderApi() # noqa: E501 + def setUp(self) -> None: + self.api = HeaderApi() - def tearDown(self): - pass + def tearDown(self) -> None: + self.api.api_client.close() - def test_test_header_integer_boolean_string(self): - """Test case for test_header_integer_boolean_string + def test_test_header_integer_boolean_string_enums(self) -> None: + """Test case for test_header_integer_boolean_string_enums Test header parameter(s) # noqa: E501 """ diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_number_properties_only.py b/samples/client/echo_api/python-pydantic-v1/test/test_number_properties_only.py index 68aa757f9df..e5072e660a2 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_number_properties_only.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_number_properties_only.py @@ -3,22 +3,20 @@ """ Echo Server API - Echo Server API # noqa: E501 + 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 import datetime -import openapi_client from openapi_client.models.number_properties_only import NumberPropertiesOnly # noqa: E501 -from openapi_client.rest import ApiException class TestNumberPropertiesOnly(unittest.TestCase): """NumberPropertiesOnly unit test stubs""" @@ -29,21 +27,21 @@ class TestNumberPropertiesOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NumberPropertiesOnly: """Test NumberPropertiesOnly include_option 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 `NumberPropertiesOnly` """ - model = openapi_client.models.number_properties_only.NumberPropertiesOnly() # noqa: E501 - if include_optional : + model = NumberPropertiesOnly() # noqa: E501 + if include_optional: return NumberPropertiesOnly( - number = 1.337, - float = 1.337, - double = '' + number = 1.337, + float = 1.337, + double = 0.8 ) - else : + else: return NumberPropertiesOnly( ) """ diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_path_api.py b/samples/client/echo_api/python-pydantic-v1/test/test_path_api.py index 4d8e71f7ce6..2b0bfc82ebf 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_path_api.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_path_api.py @@ -3,34 +3,32 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client from openapi_client.api.path_api import PathApi # noqa: E501 -from openapi_client.rest import ApiException class TestPathApi(unittest.TestCase): """PathApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.path_api.PathApi() # noqa: E501 + def setUp(self) -> None: + self.api = PathApi() - def tearDown(self): - pass + def tearDown(self) -> None: + self.api.api_client.close() - def test_tests_path_string_path_string_integer_path_integer(self): - """Test case for tests_path_string_path_string_integer_path_integer + def test_tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path(self) -> None: + """Test case for tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path Test path parameter(s) # noqa: E501 """ diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_pet.py b/samples/client/echo_api/python-pydantic-v1/test/test_pet.py index e02d8615bc0..17f0d122141 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_pet.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_pet.py @@ -3,22 +3,20 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import openapi_client from openapi_client.models.pet import Pet # noqa: E501 -from openapi_client.rest import ApiException class TestPet(unittest.TestCase): """Pet unit test stubs""" @@ -29,32 +27,32 @@ class TestPet(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Pet: """Test Pet include_option 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 = openapi_client.models.pet.Pet() # noqa: E501 - if include_optional : + model = Pet() # noqa: E501 + if include_optional: return Pet( - id = 10, - name = 'doggie', + id = 10, + name = 'doggie', category = openapi_client.models.category.Category( id = 1, - name = 'Dogs', ), + name = 'Dogs', ), photo_urls = [ '' - ], + ], tags = [ openapi_client.models.tag.Tag( id = 56, name = '', ) - ], + ], status = 'available' ) - else : + else: return Pet( name = 'doggie', photo_urls = [ diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_query.py b/samples/client/echo_api/python-pydantic-v1/test/test_query.py index a7652e1ae59..bc3dfd5afd1 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_query.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_query.py @@ -3,22 +3,20 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import openapi_client from openapi_client.models.query import Query # noqa: E501 -from openapi_client.rest import ApiException class TestQuery(unittest.TestCase): """Query unit test stubs""" @@ -29,22 +27,22 @@ class TestQuery(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Query: """Test Query include_option 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 `Query` """ - model = openapi_client.models.query.Query() # noqa: E501 - if include_optional : + model = Query() # noqa: E501 + if include_optional: return Query( - id = 56, + id = 56, outcomes = [ 'SUCCESS' ] ) - else : + else: return Query( ) """ diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_query_api.py b/samples/client/echo_api/python-pydantic-v1/test/test_query_api.py index 829a635d99b..bf983710075 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_query_api.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_query_api.py @@ -3,53 +3,100 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client from openapi_client.api.query_api import QueryApi # noqa: E501 -from openapi_client.rest import ApiException class TestQueryApi(unittest.TestCase): """QueryApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.query_api.QueryApi() # noqa: E501 + def setUp(self) -> None: + self.api = QueryApi() - def tearDown(self): + def tearDown(self) -> None: + self.api.api_client.close() + + def test_test_enum_ref_string(self) -> None: + """Test case for test_enum_ref_string + + Test query parameter(s) # noqa: E501 + """ pass - def test_test_query_integer_boolean_string(self): + def test_test_query_datetime_date_string(self) -> None: + """Test case for test_query_datetime_date_string + + Test query parameter(s) # noqa: E501 + """ + pass + + def test_test_query_integer_boolean_string(self) -> None: """Test case for test_query_integer_boolean_string Test query parameter(s) # noqa: E501 """ pass - def test_test_query_style_form_explode_true_array_string(self): + def test_test_query_style_deep_object_explode_true_object(self) -> None: + """Test case for test_query_style_deep_object_explode_true_object + + Test query parameter(s) # noqa: E501 + """ + pass + + def test_test_query_style_deep_object_explode_true_object_all_of(self) -> None: + """Test case for test_query_style_deep_object_explode_true_object_all_of + + Test query parameter(s) # noqa: E501 + """ + pass + + def test_test_query_style_form_explode_false_array_integer(self) -> None: + """Test case for test_query_style_form_explode_false_array_integer + + Test query parameter(s) # noqa: E501 + """ + pass + + def test_test_query_style_form_explode_false_array_string(self) -> None: + """Test case for test_query_style_form_explode_false_array_string + + Test query parameter(s) # noqa: E501 + """ + pass + + def test_test_query_style_form_explode_true_array_string(self) -> None: """Test case for test_query_style_form_explode_true_array_string Test query parameter(s) # noqa: E501 """ pass - def test_test_query_style_form_explode_true_object(self): + def test_test_query_style_form_explode_true_object(self) -> None: """Test case for test_query_style_form_explode_true_object Test query parameter(s) # noqa: E501 """ pass + def test_test_query_style_form_explode_true_object_all_of(self) -> None: + """Test case for test_query_style_form_explode_true_object_all_of + + Test query parameter(s) # noqa: E501 + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_string_enum_ref.py b/samples/client/echo_api/python-pydantic-v1/test/test_string_enum_ref.py index 60a3f0781b1..f48d7776fcc 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_string_enum_ref.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_string_enum_ref.py @@ -3,22 +3,20 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import openapi_client from openapi_client.models.string_enum_ref import StringEnumRef # noqa: E501 -from openapi_client.rest import ApiException class TestStringEnumRef(unittest.TestCase): """StringEnumRef unit test stubs""" diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_tag.py b/samples/client/echo_api/python-pydantic-v1/test/test_tag.py index 8e48170ab6a..ce6f8f0cdbc 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_tag.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_tag.py @@ -3,22 +3,20 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import openapi_client from openapi_client.models.tag import Tag # noqa: E501 -from openapi_client.rest import ApiException class TestTag(unittest.TestCase): """Tag unit test stubs""" @@ -29,20 +27,20 @@ class TestTag(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Tag: """Test Tag include_option 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 `Tag` """ - model = openapi_client.models.tag.Tag() # noqa: E501 - if include_optional : + model = Tag() # noqa: E501 + if include_optional: return Tag( - id = 56, + id = 56, name = '' ) - else : + else: return Tag( ) """ diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py b/samples/client/echo_api/python-pydantic-v1/test/test_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py index 39540734561..8063f5b7b63 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py @@ -3,22 +3,20 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import openapi_client from openapi_client.models.test_query_style_deep_object_explode_true_object_all_of_query_object_parameter import TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter # noqa: E501 -from openapi_client.rest import ApiException class TestTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(unittest.TestCase): """TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter unit test stubs""" @@ -29,22 +27,22 @@ class TestTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(uni def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter: """Test TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter include_option 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 `TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter` """ - model = openapi_client.models.test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() # noqa: E501 - if include_optional : + model = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() # noqa: E501 + if include_optional: return TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter( - size = '', - color = '', - id = 1, + size = '', + color = '', + id = 1, name = 'Dogs' ) - else : + else: return TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter( ) """ diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_test_query_style_form_explode_true_array_integer_query_object_parameter.py b/samples/client/echo_api/python-pydantic-v1/test/test_test_query_style_form_explode_true_array_integer_query_object_parameter.py deleted file mode 100644 index 3fc17ba947e..00000000000 --- a/samples/client/echo_api/python-pydantic-v1/test/test_test_query_style_form_explode_true_array_integer_query_object_parameter.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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 -import datetime - -from openapi_client.models.test_query_style_form_explode_true_array_integer_query_object_parameter import TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter # noqa: E501 - -class TestTestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter(unittest.TestCase): - """TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter: - """Test TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter - include_option 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 `TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter` - """ - model = TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter() # noqa: E501 - if include_optional: - return TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter( - values = [ - 56 - ] - ) - else: - return TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter( - ) - """ - - def testTestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter(self): - """Test TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/samples/client/echo_api/python-pydantic-v1/test/test_test_query_style_form_explode_true_array_string_query_object_parameter.py b/samples/client/echo_api/python-pydantic-v1/test/test_test_query_style_form_explode_true_array_string_query_object_parameter.py index 6366b5c2358..f0ce75f334f 100644 --- a/samples/client/echo_api/python-pydantic-v1/test/test_test_query_style_form_explode_true_array_string_query_object_parameter.py +++ b/samples/client/echo_api/python-pydantic-v1/test/test_test_query_style_form_explode_true_array_string_query_object_parameter.py @@ -3,22 +3,20 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import openapi_client from openapi_client.models.test_query_style_form_explode_true_array_string_query_object_parameter import TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter # noqa: E501 -from openapi_client.rest import ApiException class TestTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(unittest.TestCase): """TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter unit test stubs""" @@ -29,21 +27,21 @@ class TestTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(unittest. def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter: """Test TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter include_option 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 `TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter` """ - model = openapi_client.models.test_query_style_form_explode_true_array_string_query_object_parameter.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() # noqa: E501 - if include_optional : + model = TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() # noqa: E501 + if include_optional: return TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter( values = [ '' ] ) - else : + else: return TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter( ) """ diff --git a/samples/client/echo_api/python/test/test_auth_api.py b/samples/client/echo_api/python/test/test_auth_api.py index bfd827933bd..47756f74604 100644 --- a/samples/client/echo_api/python/test/test_auth_api.py +++ b/samples/client/echo_api/python/test/test_auth_api.py @@ -15,14 +15,14 @@ import unittest -from openapi_client.api.auth_api import AuthApi # noqa: E501 +from openapi_client.api.auth_api import AuthApi class TestAuthApi(unittest.TestCase): """AuthApi unit test stubs""" def setUp(self) -> None: - self.api = AuthApi() # noqa: E501 + self.api = AuthApi() def tearDown(self) -> None: pass @@ -30,7 +30,14 @@ class TestAuthApi(unittest.TestCase): def test_test_auth_http_basic(self) -> None: """Test case for test_auth_http_basic - To test HTTP basic authentication # noqa: E501 + To test HTTP basic authentication + """ + pass + + def test_test_auth_http_bearer(self) -> None: + """Test case for test_auth_http_bearer + + To test HTTP bearer authentication """ pass diff --git a/samples/client/echo_api/python/test/test_bird.py b/samples/client/echo_api/python/test/test_bird.py index d95a104d714..1a2289c0d47 100644 --- a/samples/client/echo_api/python/test/test_bird.py +++ b/samples/client/echo_api/python/test/test_bird.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.bird import Bird # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.bird import Bird class TestBird(unittest.TestCase): """Bird unit test stubs""" @@ -29,20 +26,20 @@ class TestBird(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Bird: """Test Bird - include_option is a boolean, when False only required + 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 `Bird` """ - model = openapi_client.models.bird.Bird() # noqa: E501 - if include_optional : + model = Bird() + if include_optional: return Bird( - size = '', + size = '', color = '' ) - else : + else: return Bird( ) """ diff --git a/samples/client/echo_api/python/test/test_body_api.py b/samples/client/echo_api/python/test/test_body_api.py index e5e24ace810..f9b7917ee00 100644 --- a/samples/client/echo_api/python/test/test_body_api.py +++ b/samples/client/echo_api/python/test/test_body_api.py @@ -3,36 +3,97 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client -from openapi_client.api.body_api import BodyApi # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.api.body_api import BodyApi class TestBodyApi(unittest.TestCase): """BodyApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.body_api.BodyApi() # noqa: E501 + def setUp(self) -> None: + self.api = BodyApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_test_echo_body_pet(self): + def test_test_binary_gif(self) -> None: + """Test case for test_binary_gif + + Test binary (gif) response body + """ + pass + + def test_test_body_application_octetstream_binary(self) -> None: + """Test case for test_body_application_octetstream_binary + + Test body parameter(s) + """ + pass + + def test_test_body_multipart_formdata_array_of_binary(self) -> None: + """Test case for test_body_multipart_formdata_array_of_binary + + Test array of binary in multipart mime + """ + pass + + def test_test_body_multipart_formdata_single_binary(self) -> None: + """Test case for test_body_multipart_formdata_single_binary + + Test single binary in multipart mime + """ + pass + + def test_test_echo_body_all_of_pet(self) -> None: + """Test case for test_echo_body_all_of_pet + + Test body parameter(s) + """ + pass + + def test_test_echo_body_free_form_object_response_string(self) -> None: + """Test case for test_echo_body_free_form_object_response_string + + Test free form object + """ + pass + + def test_test_echo_body_pet(self) -> None: """Test case for test_echo_body_pet - Test body parameter(s) # noqa: E501 + Test body parameter(s) + """ + pass + + def test_test_echo_body_pet_response_string(self) -> None: + """Test case for test_echo_body_pet_response_string + + Test empty response body + """ + pass + + def test_test_echo_body_string_enum(self) -> None: + """Test case for test_echo_body_string_enum + + Test string enum response body + """ + pass + + def test_test_echo_body_tag_response_string(self) -> None: + """Test case for test_echo_body_tag_response_string + + Test empty json (request body) """ pass diff --git a/samples/client/echo_api/python/test/test_category.py b/samples/client/echo_api/python/test/test_category.py index b5771c572d3..12dfe19f63a 100644 --- a/samples/client/echo_api/python/test/test_category.py +++ b/samples/client/echo_api/python/test/test_category.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.category import Category # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.category import Category class TestCategory(unittest.TestCase): """Category unit test stubs""" @@ -29,20 +26,20 @@ class TestCategory(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Category: """Test Category - include_option is a boolean, when False only required + 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 `Category` """ - model = openapi_client.models.category.Category() # noqa: E501 - if include_optional : + model = Category() + if include_optional: return Category( - id = 1, + id = 1, name = 'Dogs' ) - else : + else: return Category( ) """ diff --git a/samples/client/echo_api/python/test/test_data_query.py b/samples/client/echo_api/python/test/test_data_query.py index f33d8daabae..fcd7c9566a3 100644 --- a/samples/client/echo_api/python/test/test_data_query.py +++ b/samples/client/echo_api/python/test/test_data_query.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.data_query import DataQuery # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.data_query import DataQuery class TestDataQuery(unittest.TestCase): """DataQuery unit test stubs""" @@ -29,21 +26,21 @@ class TestDataQuery(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DataQuery: """Test DataQuery - include_option is a boolean, when False only required + 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 `DataQuery` """ - model = openapi_client.models.data_query.DataQuery() # noqa: E501 - if include_optional : + model = DataQuery() + if include_optional: return DataQuery( - suffix = '', - text = 'Some text', + suffix = '', + text = 'Some text', var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) - else : + else: return DataQuery( ) """ diff --git a/samples/client/echo_api/python/test/test_default_value.py b/samples/client/echo_api/python/test/test_default_value.py index 6e5f35fd2ef..4bdc4944886 100644 --- a/samples/client/echo_api/python/test/test_default_value.py +++ b/samples/client/echo_api/python/test/test_default_value.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.default_value import DefaultValue # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.default_value import DefaultValue class TestDefaultValue(unittest.TestCase): """DefaultValue unit test stubs""" @@ -29,34 +26,40 @@ class TestDefaultValue(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DefaultValue: """Test DefaultValue - include_option is a boolean, when False only required + 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 `DefaultValue` """ - model = openapi_client.models.default_value.DefaultValue() # noqa: E501 - if include_optional : + model = DefaultValue() + if include_optional: return DefaultValue( + array_string_enum_ref_default = [ + 'success' + ], array_string_enum_default = [ 'success' - ], + ], array_string_default = [ '' - ], + ], array_integer_default = [ 56 - ], + ], array_string = [ '' - ], + ], array_string_nullable = [ '' - ], + ], + array_string_extension_nullable = [ + '' + ], string_nullable = '' ) - else : + else: return DefaultValue( ) """ diff --git a/samples/client/echo_api/python/test/test_form_api.py b/samples/client/echo_api/python/test/test_form_api.py index 6422432c79b..fbd7ed641e6 100644 --- a/samples/client/echo_api/python/test/test_form_api.py +++ b/samples/client/echo_api/python/test/test_form_api.py @@ -3,36 +3,48 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client -from openapi_client.api.form_api import FormApi # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.api.form_api import FormApi class TestFormApi(unittest.TestCase): """FormApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.form_api.FormApi() # noqa: E501 + def setUp(self) -> None: + self.api = FormApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_test_form_integer_boolean_string(self): + def test_test_form_integer_boolean_string(self) -> None: """Test case for test_form_integer_boolean_string - Test form parameter(s) # noqa: E501 + Test form parameter(s) + """ + pass + + def test_test_form_object_multipart(self) -> None: + """Test case for test_form_object_multipart + + Test form parameter(s) for multipart schema + """ + pass + + def test_test_form_oneof(self) -> None: + """Test case for test_form_oneof + + Test form parameter(s) for oneOf schema """ pass diff --git a/samples/client/echo_api/python/test/test_header_api.py b/samples/client/echo_api/python/test/test_header_api.py index c1b7ed44e8f..68670ebc567 100644 --- a/samples/client/echo_api/python/test/test_header_api.py +++ b/samples/client/echo_api/python/test/test_header_api.py @@ -3,36 +3,34 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client -from openapi_client.api.header_api import HeaderApi # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.api.header_api import HeaderApi class TestHeaderApi(unittest.TestCase): """HeaderApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.header_api.HeaderApi() # noqa: E501 + def setUp(self) -> None: + self.api = HeaderApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_test_header_integer_boolean_string(self): - """Test case for test_header_integer_boolean_string + def test_test_header_integer_boolean_string_enums(self) -> None: + """Test case for test_header_integer_boolean_string_enums - Test header parameter(s) # noqa: E501 + Test header parameter(s) """ pass diff --git a/samples/client/echo_api/python/test/test_number_properties_only.py b/samples/client/echo_api/python/test/test_number_properties_only.py index 68aa757f9df..682503a0cbf 100644 --- a/samples/client/echo_api/python/test/test_number_properties_only.py +++ b/samples/client/echo_api/python/test/test_number_properties_only.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + 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 -import datetime -import openapi_client -from openapi_client.models.number_properties_only import NumberPropertiesOnly # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.number_properties_only import NumberPropertiesOnly class TestNumberPropertiesOnly(unittest.TestCase): """NumberPropertiesOnly unit test stubs""" @@ -29,21 +26,21 @@ class TestNumberPropertiesOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NumberPropertiesOnly: """Test NumberPropertiesOnly - include_option is a boolean, when False only required + 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 `NumberPropertiesOnly` """ - model = openapi_client.models.number_properties_only.NumberPropertiesOnly() # noqa: E501 - if include_optional : + model = NumberPropertiesOnly() + if include_optional: return NumberPropertiesOnly( - number = 1.337, - float = 1.337, - double = '' + number = 1.337, + var_float = 1.337, + double = 0.8 ) - else : + else: return NumberPropertiesOnly( ) """ diff --git a/samples/client/echo_api/python/test/test_path_api.py b/samples/client/echo_api/python/test/test_path_api.py index 4d8e71f7ce6..faabe210242 100644 --- a/samples/client/echo_api/python/test/test_path_api.py +++ b/samples/client/echo_api/python/test/test_path_api.py @@ -3,36 +3,34 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client -from openapi_client.api.path_api import PathApi # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.api.path_api import PathApi class TestPathApi(unittest.TestCase): """PathApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.path_api.PathApi() # noqa: E501 + def setUp(self) -> None: + self.api = PathApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_tests_path_string_path_string_integer_path_integer(self): - """Test case for tests_path_string_path_string_integer_path_integer + def test_tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path(self) -> None: + """Test case for tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_enum_ref_string_path - Test path parameter(s) # noqa: E501 + Test path parameter(s) """ pass diff --git a/samples/client/echo_api/python/test/test_pet.py b/samples/client/echo_api/python/test/test_pet.py index e02d8615bc0..21965554b26 100644 --- a/samples/client/echo_api/python/test/test_pet.py +++ b/samples/client/echo_api/python/test/test_pet.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.pet import Pet # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.pet import Pet class TestPet(unittest.TestCase): """Pet unit test stubs""" @@ -29,32 +26,32 @@ class TestPet(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Pet: """Test Pet - include_option is a boolean, when False only required + 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 = openapi_client.models.pet.Pet() # noqa: E501 - if include_optional : + model = Pet() + if include_optional: return Pet( - id = 10, - name = 'doggie', + id = 10, + name = 'doggie', category = openapi_client.models.category.Category( id = 1, - name = 'Dogs', ), + name = 'Dogs', ), photo_urls = [ '' - ], + ], tags = [ openapi_client.models.tag.Tag( id = 56, name = '', ) - ], + ], status = 'available' ) - else : + else: return Pet( name = 'doggie', photo_urls = [ diff --git a/samples/client/echo_api/python/test/test_query.py b/samples/client/echo_api/python/test/test_query.py index a7652e1ae59..c3d033ef0b5 100644 --- a/samples/client/echo_api/python/test/test_query.py +++ b/samples/client/echo_api/python/test/test_query.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.query import Query # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.query import Query class TestQuery(unittest.TestCase): """Query unit test stubs""" @@ -29,22 +26,22 @@ class TestQuery(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Query: """Test Query - include_option is a boolean, when False only required + 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 `Query` """ - model = openapi_client.models.query.Query() # noqa: E501 - if include_optional : + model = Query() + if include_optional: return Query( - id = 56, + id = 56, outcomes = [ 'SUCCESS' ] ) - else : + else: return Query( ) """ diff --git a/samples/client/echo_api/python/test/test_query_api.py b/samples/client/echo_api/python/test/test_query_api.py index 829a635d99b..e2e6c2dac46 100644 --- a/samples/client/echo_api/python/test/test_query_api.py +++ b/samples/client/echo_api/python/test/test_query_api.py @@ -3,50 +3,97 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import openapi_client -from openapi_client.api.query_api import QueryApi # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.api.query_api import QueryApi class TestQueryApi(unittest.TestCase): """QueryApi unit test stubs""" - def setUp(self): - self.api = openapi_client.api.query_api.QueryApi() # noqa: E501 + def setUp(self) -> None: + self.api = QueryApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_test_query_integer_boolean_string(self): + def test_test_enum_ref_string(self) -> None: + """Test case for test_enum_ref_string + + Test query parameter(s) + """ + pass + + def test_test_query_datetime_date_string(self) -> None: + """Test case for test_query_datetime_date_string + + Test query parameter(s) + """ + pass + + def test_test_query_integer_boolean_string(self) -> None: """Test case for test_query_integer_boolean_string - Test query parameter(s) # noqa: E501 + Test query parameter(s) """ pass - def test_test_query_style_form_explode_true_array_string(self): + def test_test_query_style_deep_object_explode_true_object(self) -> None: + """Test case for test_query_style_deep_object_explode_true_object + + Test query parameter(s) + """ + pass + + def test_test_query_style_deep_object_explode_true_object_all_of(self) -> None: + """Test case for test_query_style_deep_object_explode_true_object_all_of + + Test query parameter(s) + """ + pass + + def test_test_query_style_form_explode_false_array_integer(self) -> None: + """Test case for test_query_style_form_explode_false_array_integer + + Test query parameter(s) + """ + pass + + def test_test_query_style_form_explode_false_array_string(self) -> None: + """Test case for test_query_style_form_explode_false_array_string + + Test query parameter(s) + """ + pass + + def test_test_query_style_form_explode_true_array_string(self) -> None: """Test case for test_query_style_form_explode_true_array_string - Test query parameter(s) # noqa: E501 + Test query parameter(s) """ pass - def test_test_query_style_form_explode_true_object(self): + def test_test_query_style_form_explode_true_object(self) -> None: """Test case for test_query_style_form_explode_true_object - Test query parameter(s) # noqa: E501 + Test query parameter(s) + """ + pass + + def test_test_query_style_form_explode_true_object_all_of(self) -> None: + """Test case for test_query_style_form_explode_true_object_all_of + + Test query parameter(s) """ pass diff --git a/samples/client/echo_api/python/test/test_string_enum_ref.py b/samples/client/echo_api/python/test/test_string_enum_ref.py index 60a3f0781b1..ece5b369cc2 100644 --- a/samples/client/echo_api/python/test/test_string_enum_ref.py +++ b/samples/client/echo_api/python/test/test_string_enum_ref.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.string_enum_ref import StringEnumRef # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.string_enum_ref import StringEnumRef class TestStringEnumRef(unittest.TestCase): """StringEnumRef unit test stubs""" diff --git a/samples/client/echo_api/python/test/test_tag.py b/samples/client/echo_api/python/test/test_tag.py index 8e48170ab6a..7e235ac8b95 100644 --- a/samples/client/echo_api/python/test/test_tag.py +++ b/samples/client/echo_api/python/test/test_tag.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.tag import Tag # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.tag import Tag class TestTag(unittest.TestCase): """Tag unit test stubs""" @@ -29,20 +26,20 @@ class TestTag(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Tag: """Test Tag - include_option is a boolean, when False only required + 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 `Tag` """ - model = openapi_client.models.tag.Tag() # noqa: E501 - if include_optional : + model = Tag() + if include_optional: return Tag( - id = 56, + id = 56, name = '' ) - else : + else: return Tag( ) """ diff --git a/samples/client/echo_api/python/test/test_test_form_object_multipart_request_marker.py b/samples/client/echo_api/python/test/test_test_form_object_multipart_request_marker.py index d4997428606..97f5600a234 100644 --- a/samples/client/echo_api/python/test/test_test_form_object_multipart_request_marker.py +++ b/samples/client/echo_api/python/test/test_test_form_object_multipart_request_marker.py @@ -28,7 +28,7 @@ class TestTestFormObjectMultipartRequestMarker(unittest.TestCase): def make_instance(self, include_optional) -> TestFormObjectMultipartRequestMarker: """Test TestFormObjectMultipartRequestMarker - include_option is a boolean, when False only required + 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 `TestFormObjectMultipartRequestMarker` diff --git a/samples/client/echo_api/python/test/test_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py b/samples/client/echo_api/python/test/test_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py index 39540734561..22731b578cc 100644 --- a/samples/client/echo_api/python/test/test_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py +++ b/samples/client/echo_api/python/test/test_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.test_query_style_deep_object_explode_true_object_all_of_query_object_parameter import TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.test_query_style_deep_object_explode_true_object_all_of_query_object_parameter import TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter class TestTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(unittest.TestCase): """TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter unit test stubs""" @@ -29,22 +26,22 @@ class TestTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(uni def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter: """Test TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter - include_option is a boolean, when False only required + 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 `TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter` """ - model = openapi_client.models.test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() # noqa: E501 - if include_optional : + model = TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() + if include_optional: return TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter( - size = '', - color = '', - id = 1, + size = '', + color = '', + id = 1, name = 'Dogs' ) - else : + else: return TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter( ) """ diff --git a/samples/client/echo_api/python/test/test_test_query_style_form_explode_true_array_integer_query_object_parameter.py b/samples/client/echo_api/python/test/test_test_query_style_form_explode_true_array_integer_query_object_parameter.py deleted file mode 100644 index 2b35c46cb3f..00000000000 --- a/samples/client/echo_api/python/test/test_test_query_style_form_explode_true_array_integer_query_object_parameter.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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.test_query_style_form_explode_true_array_integer_query_object_parameter import TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter - -class TestTestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter(unittest.TestCase): - """TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter: - """Test TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter - include_option 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 `TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter` - """ - model = TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter() - if include_optional: - return TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter( - values = [ - 56 - ] - ) - else: - return TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter( - ) - """ - - def testTestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter(self): - """Test TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/samples/client/echo_api/python/test/test_test_query_style_form_explode_true_array_string_query_object_parameter.py b/samples/client/echo_api/python/test/test_test_query_style_form_explode_true_array_string_query_object_parameter.py index 6366b5c2358..2656fbf8e02 100644 --- a/samples/client/echo_api/python/test/test_test_query_style_form_explode_true_array_string_query_object_parameter.py +++ b/samples/client/echo_api/python/test/test_test_query_style_form_explode_true_array_string_query_object_parameter.py @@ -3,22 +3,19 @@ """ Echo Server API - Echo Server API # noqa: E501 + Echo Server API The version of the OpenAPI document: 0.1.0 Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import openapi_client -from openapi_client.models.test_query_style_form_explode_true_array_string_query_object_parameter import TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter # noqa: E501 -from openapi_client.rest import ApiException +from openapi_client.models.test_query_style_form_explode_true_array_string_query_object_parameter import TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter class TestTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(unittest.TestCase): """TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter unit test stubs""" @@ -29,21 +26,21 @@ class TestTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(unittest. def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter: """Test TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter - include_option is a boolean, when False only required + 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 `TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter` """ - model = openapi_client.models.test_query_style_form_explode_true_array_string_query_object_parameter.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() # noqa: E501 - if include_optional : + model = TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() + if include_optional: return TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter( values = [ '' ] ) - else : + else: return TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter( ) """ diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_another_fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_another_fake_api.py index 89c28d0ff7e..93d3c408894 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_another_fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_another_fake_api.py @@ -24,7 +24,7 @@ class TestAnotherFakeApi(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_default_api.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_default_api.py index a0e95f5d9eb..763eed82505 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_default_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_default_api.py @@ -24,7 +24,7 @@ class TestDefaultApi(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_test.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_test.py index e83daf72458..5f2f59e6c62 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_test.py @@ -42,6 +42,8 @@ class TestEnumTest(unittest.TestCase): enum_number = 1.1, enum_number_vendor_ext = 42, enum_string_vendor_ext = 'FOO', + enum_string_single_member = 'abc', + enum_integer_single_member = 100, outer_enum = 'placed', outer_enum_integer = 2, outer_enum_default_value = 'placed', diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_fake_api.py index 902c6faa722..048479d824e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_fake_api.py @@ -24,7 +24,7 @@ class TestFakeApi(unittest.IsolatedAsyncioTestCase): 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 @@ -267,6 +267,13 @@ class TestFakeApi(unittest.IsolatedAsyncioTestCase): """ pass + async def test_upload_file_with_additional_properties(self) -> None: + """Test case for upload_file_with_additional_properties + + uploads a file and additional properties using multipart/form-data + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_fake_classname_tags123_api.py index db43948df4d..12a8629dc30 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_fake_classname_tags123_api.py @@ -24,7 +24,7 @@ class TestFakeClassnameTags123Api(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_import_test_datetime_api.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_import_test_datetime_api.py index c8effe2e53a..73069b62612 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_import_test_datetime_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_import_test_datetime_api.py @@ -24,7 +24,7 @@ class TestImportTestDatetimeApi(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_pet_api.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_pet_api.py index 278abd0f0c4..19c138fee2c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_pet_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_pet_api.py @@ -24,7 +24,7 @@ class TestPetApi(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_store_api.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_store_api.py index 166821bab54..5cbcd18b75f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_store_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_store_api.py @@ -24,7 +24,7 @@ class TestStoreApi(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_user_api.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_user_api.py index ba67311e393..e091d190dea 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_user_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_user_api.py @@ -24,7 +24,7 @@ class TestUserApi(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_another_fake_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_another_fake_api.py index 4066eae53a8..8a2d152a8ed 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_another_fake_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_another_fake_api.py @@ -24,7 +24,7 @@ class TestAnotherFakeApi(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_default_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_default_api.py index 1485ea799f7..d95ab045e08 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_default_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_default_api.py @@ -24,7 +24,7 @@ class TestDefaultApi(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_test.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_test.py index 3c57cd467c8..a9f432cf9ce 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_test.py @@ -43,6 +43,8 @@ class TestEnumTest(unittest.TestCase): enum_number = 1.1, enum_number_vendor_ext = 42, enum_string_vendor_ext = 'FOO', + enum_string_single_member = 'abc', + enum_integer_single_member = 100, outer_enum = 'placed', outer_enum_integer = 2, outer_enum_default_value = 'placed', diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_fake_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_fake_api.py index dcaf7fb84f1..257a83ba918 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_fake_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_fake_api.py @@ -24,7 +24,7 @@ class TestFakeApi(unittest.IsolatedAsyncioTestCase): 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 @@ -267,6 +267,13 @@ class TestFakeApi(unittest.IsolatedAsyncioTestCase): """ pass + async def test_upload_file_with_additional_properties(self) -> None: + """Test case for upload_file_with_additional_properties + + uploads a file and additional properties using multipart/form-data # noqa: E501 + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_fake_classname_tags123_api.py index 0b3fcb004d9..24acad38d43 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_fake_classname_tags123_api.py @@ -24,7 +24,7 @@ class TestFakeClassnameTags123Api(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_import_test_datetime_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_import_test_datetime_api.py index ba6b500f4eb..f573836f171 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_import_test_datetime_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_import_test_datetime_api.py @@ -24,7 +24,7 @@ class TestImportTestDatetimeApi(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_pet_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_pet_api.py index 35c72b2892b..32b548703a8 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_pet_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_pet_api.py @@ -24,7 +24,7 @@ class TestPetApi(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_store_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_store_api.py index 8c2ba9c1e5c..4f1f78442c9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_store_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_store_api.py @@ -24,7 +24,7 @@ class TestStoreApi(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_user_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_user_api.py index 769d7e00f8e..12c80839d25 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_user_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_user_api.py @@ -24,7 +24,7 @@ class TestUserApi(unittest.IsolatedAsyncioTestCase): 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 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_any_type.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_any_type.py index c2c9c7c5806..a1669f0664d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_any_type.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_any_type.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.additional_properties_any_type import AdditionalPropertiesAnyType # noqa: E501 -from petstore_api.rest import ApiException class TestAdditionalPropertiesAnyType(unittest.TestCase): """AdditionalPropertiesAnyType unit test stubs""" @@ -28,19 +26,19 @@ class TestAdditionalPropertiesAnyType(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AdditionalPropertiesAnyType: """Test AdditionalPropertiesAnyType include_option 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 `AdditionalPropertiesAnyType` """ - model = petstore_api.models.additional_properties_any_type.AdditionalPropertiesAnyType() # noqa: E501 - if include_optional : + model = AdditionalPropertiesAnyType() # noqa: E501 + if include_optional: return AdditionalPropertiesAnyType( name = '' ) - else : + else: return AdditionalPropertiesAnyType( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_class.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_class.py index e3b48bedd57..d1dc12c4458 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_class.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.additional_properties_class import AdditionalPropertiesClass # noqa: E501 -from petstore_api.rest import ApiException class TestAdditionalPropertiesClass(unittest.TestCase): """AdditionalPropertiesClass unit test stubs""" @@ -28,26 +26,26 @@ class TestAdditionalPropertiesClass(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AdditionalPropertiesClass: """Test AdditionalPropertiesClass include_option 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 `AdditionalPropertiesClass` """ - model = petstore_api.models.additional_properties_class.AdditionalPropertiesClass() # noqa: E501 - if include_optional : + model = AdditionalPropertiesClass() # noqa: E501 + if include_optional: return AdditionalPropertiesClass( map_property = { 'key' : '' - }, + }, map_of_map_property = { 'key' : { 'key' : '' } } ) - else : + else: return AdditionalPropertiesClass( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_object.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_object.py index b68a8fda579..9bfa2a0cde8 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_object.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_object.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.additional_properties_object import AdditionalPropertiesObject # noqa: E501 -from petstore_api.rest import ApiException class TestAdditionalPropertiesObject(unittest.TestCase): """AdditionalPropertiesObject unit test stubs""" @@ -28,19 +26,19 @@ class TestAdditionalPropertiesObject(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AdditionalPropertiesObject: """Test AdditionalPropertiesObject include_option 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 `AdditionalPropertiesObject` """ - model = petstore_api.models.additional_properties_object.AdditionalPropertiesObject() # noqa: E501 - if include_optional : + model = AdditionalPropertiesObject() # noqa: E501 + if include_optional: return AdditionalPropertiesObject( name = '' ) - else : + else: return AdditionalPropertiesObject( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_with_description_only.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_with_description_only.py index d5166dfe134..88df1cc9295 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_with_description_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_additional_properties_with_description_only.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.additional_properties_with_description_only import AdditionalPropertiesWithDescriptionOnly # noqa: E501 -from petstore_api.rest import ApiException class TestAdditionalPropertiesWithDescriptionOnly(unittest.TestCase): """AdditionalPropertiesWithDescriptionOnly unit test stubs""" @@ -28,19 +26,19 @@ class TestAdditionalPropertiesWithDescriptionOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AdditionalPropertiesWithDescriptionOnly: """Test AdditionalPropertiesWithDescriptionOnly include_option 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 `AdditionalPropertiesWithDescriptionOnly` """ - model = petstore_api.models.additional_properties_with_description_only.AdditionalPropertiesWithDescriptionOnly() # noqa: E501 - if include_optional : + model = AdditionalPropertiesWithDescriptionOnly() # noqa: E501 + if include_optional: return AdditionalPropertiesWithDescriptionOnly( name = '' ) - else : + else: return AdditionalPropertiesWithDescriptionOnly( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_all_of_with_single_ref.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_all_of_with_single_ref.py index ee761ef82d0..920ad3782e1 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_all_of_with_single_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_all_of_with_single_ref.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.all_of_with_single_ref import AllOfWithSingleRef # noqa: E501 -from petstore_api.rest import ApiException class TestAllOfWithSingleRef(unittest.TestCase): """AllOfWithSingleRef unit test stubs""" @@ -28,25 +26,28 @@ class TestAllOfWithSingleRef(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AllOfWithSingleRef: """Test AllOfWithSingleRef include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.all_of_with_single_ref.AllOfWithSingleRef() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AllOfWithSingleRef` + """ + model = AllOfWithSingleRef() # noqa: E501 + if include_optional: return AllOfWithSingleRef( - username = '', - single_ref_type = None + username = '', + single_ref_type = 'admin' ) - else : + else: return AllOfWithSingleRef( ) + """ def testAllOfWithSingleRef(self): """Test AllOfWithSingleRef""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_animal.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_animal.py index d209151de67..b0b62a0bb2b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_animal.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_animal.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.animal import Animal # noqa: E501 -from petstore_api.rest import ApiException class TestAnimal(unittest.TestCase): """Animal unit test stubs""" @@ -28,26 +26,29 @@ class TestAnimal(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Animal: """Test Animal include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.animal.Animal() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Animal` + """ + model = Animal() # noqa: E501 + if include_optional: return Animal( - class_name = '', + class_name = '', color = 'red' ) - else : + else: return Animal( class_name = '', ) + """ def testAnimal(self): """Test Animal""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_another_fake_api.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_another_fake_api.py index d95798cfc5a..29a8cab199e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_another_fake_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_another_fake_api.py @@ -3,32 +3,30 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import petstore_api from petstore_api.api.another_fake_api import AnotherFakeApi # noqa: E501 -from petstore_api.rest import ApiException class TestAnotherFakeApi(unittest.TestCase): """AnotherFakeApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.another_fake_api.AnotherFakeApi() # noqa: E501 + def setUp(self) -> None: + self.api = AnotherFakeApi() - def tearDown(self): - pass + def tearDown(self) -> None: + self.api.api_client.close() - def test_call_123_test_special_tags(self): + def test_call_123_test_special_tags(self) -> None: """Test case for call_123_test_special_tags To test special tags # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_any_of_color.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_any_of_color.py index 2a97cfef752..f99dfd0020b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_any_of_color.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_any_of_color.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.any_of_color import AnyOfColor # noqa: E501 -from petstore_api.rest import ApiException class TestAnyOfColor(unittest.TestCase): """AnyOfColor unit test stubs""" @@ -28,18 +26,18 @@ class TestAnyOfColor(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AnyOfColor: """Test AnyOfColor include_option 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 `AnyOfColor` """ - model = petstore_api.models.any_of_color.AnyOfColor() # noqa: E501 - if include_optional : + model = AnyOfColor() # noqa: E501 + if include_optional: return AnyOfColor( ) - else : + else: return AnyOfColor( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_any_of_pig.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_any_of_pig.py index f041e5f9d6f..c3e4760182c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_any_of_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_any_of_pig.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.any_of_pig import AnyOfPig # noqa: E501 -from petstore_api.rest import ApiException class TestAnyOfPig(unittest.TestCase): """AnyOfPig unit test stubs""" @@ -28,6 +26,28 @@ class TestAnyOfPig(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> AnyOfPig: + """Test AnyOfPig + include_option 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 `AnyOfPig` + """ + model = AnyOfPig() # noqa: E501 + if include_optional: + return AnyOfPig( + class_name = '', + color = '', + size = 56 + ) + else: + return AnyOfPig( + class_name = '', + color = '', + size = 56, + ) + """ + def testAnyOfPig(self): """Test AnyOfPig""" # inst_req_only = self.make_instance(include_optional=False) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_api_response.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_api_response.py index 95efd33bce5..9882aa1b900 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_api_response.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_api_response.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.api_response import ApiResponse # noqa: E501 -from petstore_api.rest import ApiException class TestApiResponse(unittest.TestCase): """ApiResponse unit test stubs""" @@ -28,26 +26,29 @@ class TestApiResponse(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ApiResponse: """Test ApiResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.api_response.ApiResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ApiResponse` + """ + model = ApiResponse() # noqa: E501 + if include_optional: return ApiResponse( - code = 56, - type = '', + code = 56, + type = '', message = '' ) - else : + else: return ApiResponse( ) + """ def testApiResponse(self): """Test ApiResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_of_array_of_model.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_of_array_of_model.py index 1072a19255d..7c0809b0b23 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_of_array_of_model.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.array_of_array_of_model import ArrayOfArrayOfModel # noqa: E501 -from petstore_api.rest import ApiException class TestArrayOfArrayOfModel(unittest.TestCase): """ArrayOfArrayOfModel unit test stubs""" @@ -28,17 +26,17 @@ class TestArrayOfArrayOfModel(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ArrayOfArrayOfModel: """Test ArrayOfArrayOfModel include_option 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 `ArrayOfArrayOfModel` """ - model = petstore_api.models.array_of_array_of_model.ArrayOfArrayOfModel() # noqa: E501 - if include_optional : + model = ArrayOfArrayOfModel() # noqa: E501 + if include_optional: return ArrayOfArrayOfModel( - shop_id_to_org_online_lip_map = [ + another_property = [ [ petstore_api.models.tag.Tag( id = 56, @@ -46,7 +44,7 @@ class TestArrayOfArrayOfModel(unittest.TestCase): ] ] ) - else : + else: return ArrayOfArrayOfModel( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_of_array_of_number_only.py index 001b4e56573..22160c2bd05 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_of_array_of_number_only.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly # noqa: E501 -from petstore_api.rest import ApiException class TestArrayOfArrayOfNumberOnly(unittest.TestCase): """ArrayOfArrayOfNumberOnly unit test stubs""" @@ -28,13 +26,15 @@ class TestArrayOfArrayOfNumberOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ArrayOfArrayOfNumberOnly: """Test ArrayOfArrayOfNumberOnly include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.array_of_array_of_number_only.ArrayOfArrayOfNumberOnly() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ArrayOfArrayOfNumberOnly` + """ + model = ArrayOfArrayOfNumberOnly() # noqa: E501 + if include_optional: return ArrayOfArrayOfNumberOnly( array_array_number = [ [ @@ -42,14 +42,15 @@ class TestArrayOfArrayOfNumberOnly(unittest.TestCase): ] ] ) - else : + else: return ArrayOfArrayOfNumberOnly( ) + """ def testArrayOfArrayOfNumberOnly(self): """Test ArrayOfArrayOfNumberOnly""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_of_number_only.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_of_number_only.py index a35703ae0da..ade32f4f8f2 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_of_number_only.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.array_of_number_only import ArrayOfNumberOnly # noqa: E501 -from petstore_api.rest import ApiException class TestArrayOfNumberOnly(unittest.TestCase): """ArrayOfNumberOnly unit test stubs""" @@ -28,26 +26,29 @@ class TestArrayOfNumberOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ArrayOfNumberOnly: """Test ArrayOfNumberOnly include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.array_of_number_only.ArrayOfNumberOnly() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ArrayOfNumberOnly` + """ + model = ArrayOfNumberOnly() # noqa: E501 + if include_optional: return ArrayOfNumberOnly( array_number = [ 1.337 ] ) - else : + else: return ArrayOfNumberOnly( ) + """ def testArrayOfNumberOnly(self): """Test ArrayOfNumberOnly""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_test.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_test.py index 8327e415adc..6858000a8b0 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_array_test.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.array_test import ArrayTest # noqa: E501 -from petstore_api.rest import ApiException class TestArrayTest(unittest.TestCase): """ArrayTest unit test stubs""" @@ -28,22 +26,27 @@ class TestArrayTest(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ArrayTest: """Test ArrayTest include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.array_test.ArrayTest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ArrayTest` + """ + model = ArrayTest() # noqa: E501 + if include_optional: return ArrayTest( array_of_string = [ '' - ], + ], + array_of_nullable_float = [ + 1.337 + ], array_array_of_integer = [ [ 56 ] - ], + ], array_array_of_model = [ [ petstore_api.models.read_only_first.ReadOnlyFirst( @@ -52,14 +55,15 @@ class TestArrayTest(unittest.TestCase): ] ] ) - else : + else: return ArrayTest( ) + """ def testArrayTest(self): """Test ArrayTest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_basque_pig.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_basque_pig.py index 26e2a845a95..42f62fa3111 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_basque_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_basque_pig.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.basque_pig import BasquePig # noqa: E501 -from petstore_api.rest import ApiException class TestBasquePig(unittest.TestCase): """BasquePig unit test stubs""" @@ -28,27 +26,30 @@ class TestBasquePig(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> BasquePig: """Test BasquePig include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.basque_pig.BasquePig() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `BasquePig` + """ + model = BasquePig() # noqa: E501 + if include_optional: return BasquePig( - class_name = '', + class_name = '', color = '' ) - else : + else: return BasquePig( class_name = '', color = '', ) + """ def testBasquePig(self): """Test BasquePig""" - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_capitalization.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_capitalization.py index c7a9721dbc0..17b75e51e36 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_capitalization.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_capitalization.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.capitalization import Capitalization # noqa: E501 -from petstore_api.rest import ApiException class TestCapitalization(unittest.TestCase): """Capitalization unit test stubs""" @@ -28,29 +26,32 @@ class TestCapitalization(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Capitalization: """Test Capitalization include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.capitalization.Capitalization() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Capitalization` + """ + model = Capitalization() # noqa: E501 + if include_optional: return Capitalization( - small_camel = '', - capital_camel = '', - small_snake = '', - capital_snake = '', - sca_eth_flow_points = '', + small_camel = '', + capital_camel = '', + small_snake = '', + capital_snake = '', + sca_eth_flow_points = '', att_name = '' ) - else : + else: return Capitalization( ) + """ def testCapitalization(self): """Test Capitalization""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_cat.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_cat.py index e04566b1aaf..58e743f44c8 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_cat.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_cat.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.cat import Cat # noqa: E501 -from petstore_api.rest import ApiException class TestCat(unittest.TestCase): """Cat unit test stubs""" @@ -28,6 +26,23 @@ class TestCat(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Cat: + """Test Cat + include_option 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 `Cat` + """ + model = Cat() # noqa: E501 + if include_optional: + return Cat( + declawed = True + ) + else: + return Cat( + ) + """ + def testCat(self): """Test Cat""" # inst_req_only = self.make_instance(include_optional=False) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_category.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_category.py index 14848fcebcd..2a287246f81 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_category.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_category.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.category import Category # noqa: E501 -from petstore_api.rest import ApiException class TestCategory(unittest.TestCase): """Category unit test stubs""" @@ -28,21 +26,24 @@ class TestCategory(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Category: """Test Category include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.category.Category() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Category` + """ + model = Category() # noqa: E501 + if include_optional: return Category( - id = 56, + id = 56, name = 'default-name' ) - else : + else: return Category( name = 'default-name', ) + """ def testCategory(self): """Test Category""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_circular_all_of_ref.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_circular_all_of_ref.py index f72aa632ba8..aaa48641b37 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_circular_all_of_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_circular_all_of_ref.py @@ -36,16 +36,10 @@ class TestCircularAllOfRef(unittest.TestCase): model = CircularAllOfRef() # noqa: E501 if include_optional: return CircularAllOfRef( + name = '', second_circular_all_of_ref = [ - petstore_api.models.second_circular_all_of_ref.SecondCircularAllOfRef( - circular_all_of_ref = [ - petstore_api.models.circular_all_of_ref.CircularAllOfRef( - second_circular_all_of_ref = [ - petstore_api.models.second_circular_all_of_ref.SecondCircularAllOfRef() - ], ) - ], ) - ], - name = '' + petstore_api.models.second_circular_all_of_ref.SecondCircularAllOfRef() + ] ) else: return CircularAllOfRef( diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_circular_reference_model.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_circular_reference_model.py index f734d3fc0ff..f23f0200022 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_circular_reference_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_circular_reference_model.py @@ -3,23 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 -from __future__ import absolute_import - import unittest import datetime -import petstore_api from petstore_api.models.circular_reference_model import CircularReferenceModel # noqa: E501 -from petstore_api.rest import ApiException class TestCircularReferenceModel(unittest.TestCase): """CircularReferenceModel unit test stubs""" @@ -30,17 +26,17 @@ class TestCircularReferenceModel(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CircularReferenceModel: """Test CircularReferenceModel include_option 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 `CircularReferenceModel` """ - model = petstore_api.models.circular_reference_model.CircularReferenceModel() # noqa: E501 - if include_optional : + model = CircularReferenceModel() # noqa: E501 + if include_optional: return CircularReferenceModel( - size = 56, + size = 56, nested = petstore_api.models.first_ref.FirstRef( category = '', self_ref = petstore_api.models.second_ref.SecondRef( @@ -50,7 +46,7 @@ class TestCircularReferenceModel(unittest.TestCase): nested = petstore_api.models.first_ref.FirstRef( category = '', ), ), ), ) ) - else : + else: return CircularReferenceModel( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_class_model.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_class_model.py index 511843f2dcf..6b78a194182 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_class_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_class_model.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.class_model import ClassModel # noqa: E501 -from petstore_api.rest import ApiException class TestClassModel(unittest.TestCase): """ClassModel unit test stubs""" @@ -28,24 +26,27 @@ class TestClassModel(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ClassModel: """Test ClassModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.class_model.ClassModel() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ClassModel` + """ + model = ClassModel() # noqa: E501 + if include_optional: return ClassModel( - _class = '' + var_class = '' ) - else : + else: return ClassModel( ) + """ def testClassModel(self): """Test ClassModel""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_client.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_client.py index 9209bb2c3f0..9d109601e81 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_client.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_client.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.client import Client # noqa: E501 -from petstore_api.rest import ApiException class TestClient(unittest.TestCase): """Client unit test stubs""" @@ -28,24 +26,27 @@ class TestClient(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Client: """Test Client include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.client.Client() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Client` + """ + model = Client() # noqa: E501 + if include_optional: return Client( client = '' ) - else : + else: return Client( ) + """ def testClient(self): """Test Client""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_color.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_color.py index 9a7aabfea25..21f53552b36 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_color.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_color.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.color import Color # noqa: E501 -from petstore_api.rest import ApiException class TestColor(unittest.TestCase): """Color unit test stubs""" @@ -28,18 +26,18 @@ class TestColor(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Color: """Test Color include_option 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 `Color` """ - model = petstore_api.models.color.Color() # noqa: E501 - if include_optional : + model = Color() # noqa: E501 + if include_optional: return Color( ) - else : + else: return Color( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_creature.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_creature.py index 66b3e088cbb..af6b9ef7b31 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_creature.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_creature.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.creature import Creature # noqa: E501 -from petstore_api.rest import ApiException class TestCreature(unittest.TestCase): """Creature unit test stubs""" @@ -28,21 +26,21 @@ class TestCreature(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Creature: """Test Creature include_option 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 `Creature` """ - model = petstore_api.models.creature.Creature() # noqa: E501 - if include_optional : + model = Creature() # noqa: E501 + if include_optional: return Creature( info = petstore_api.models.creature_info.CreatureInfo( - name = '', ), + name = '', ), type = '' ) - else : + else: return Creature( info = petstore_api.models.creature_info.CreatureInfo( name = '', ), diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_creature_info.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_creature_info.py index 0a85d5ffe7b..a95dfd3d922 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_creature_info.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_creature_info.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.creature_info import CreatureInfo # noqa: E501 -from petstore_api.rest import ApiException class TestCreatureInfo(unittest.TestCase): """CreatureInfo unit test stubs""" @@ -28,19 +26,19 @@ class TestCreatureInfo(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CreatureInfo: """Test CreatureInfo include_option 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 `CreatureInfo` """ - model = petstore_api.models.creature_info.CreatureInfo() # noqa: E501 - if include_optional : + model = CreatureInfo() # noqa: E501 + if include_optional: return CreatureInfo( name = '' ) - else : + else: return CreatureInfo( name = '', ) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_danish_pig.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_danish_pig.py index 0d850ae94f4..bbd0ffcb5f0 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_danish_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_danish_pig.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.danish_pig import DanishPig # noqa: E501 -from petstore_api.rest import ApiException class TestDanishPig(unittest.TestCase): """DanishPig unit test stubs""" @@ -28,27 +26,30 @@ class TestDanishPig(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DanishPig: """Test DanishPig include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.danish_pig.DanishPig() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `DanishPig` + """ + model = DanishPig() # noqa: E501 + if include_optional: return DanishPig( - class_name = '', + class_name = '', size = 56 ) - else : + else: return DanishPig( class_name = '', size = 56, ) + """ def testDanishPig(self): """Test DanishPig""" - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_default_api.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_default_api.py index 50e7c57bd0b..20486430976 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_default_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_default_api.py @@ -3,32 +3,30 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import petstore_api from petstore_api.api.default_api import DefaultApi # noqa: E501 -from petstore_api.rest import ApiException class TestDefaultApi(unittest.TestCase): """DefaultApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.default_api.DefaultApi() # noqa: E501 + def setUp(self) -> None: + self.api = DefaultApi() - def tearDown(self): - pass + def tearDown(self) -> None: + self.api.api_client.close() - def test_foo_get(self): + def test_foo_get(self) -> None: """Test case for foo_get """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_deprecated_object.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_deprecated_object.py index 50257271cd7..ba3a63c719d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_deprecated_object.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_deprecated_object.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.deprecated_object import DeprecatedObject # noqa: E501 -from petstore_api.rest import ApiException class TestDeprecatedObject(unittest.TestCase): """DeprecatedObject unit test stubs""" @@ -28,24 +26,27 @@ class TestDeprecatedObject(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DeprecatedObject: """Test DeprecatedObject include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.deprecated_object.DeprecatedObject() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `DeprecatedObject` + """ + model = DeprecatedObject() # noqa: E501 + if include_optional: return DeprecatedObject( name = '' ) - else : + else: return DeprecatedObject( ) + """ def testDeprecatedObject(self): """Test DeprecatedObject""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_dog.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_dog.py index af75161287e..d8a51df906c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_dog.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_dog.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.dog import Dog # noqa: E501 -from petstore_api.rest import ApiException class TestDog(unittest.TestCase): """Dog unit test stubs""" @@ -28,6 +26,23 @@ class TestDog(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Dog: + """Test Dog + include_option 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 `Dog` + """ + model = Dog() # noqa: E501 + if include_optional: + return Dog( + breed = '' + ) + else: + return Dog( + ) + """ + def testDog(self): """Test Dog""" # inst_req_only = self.make_instance(include_optional=False) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_dummy_model.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_dummy_model.py index d6562c58bc2..45459b666b1 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_dummy_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_dummy_model.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.dummy_model import DummyModel # noqa: E501 -from petstore_api.rest import ApiException class TestDummyModel(unittest.TestCase): """DummyModel unit test stubs""" @@ -28,23 +26,23 @@ class TestDummyModel(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DummyModel: """Test DummyModel include_option 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 `DummyModel` """ - model = petstore_api.models.dummy_model.DummyModel() # noqa: E501 - if include_optional : + model = DummyModel() # noqa: E501 + if include_optional: return DummyModel( - category = '', + category = '', self_ref = petstore_api.models.self_reference_model.Self-Reference-Model( size = 56, nested = petstore_api.models.dummy_model.Dummy-Model( category = '', ), ) ) - else : + else: return DummyModel( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_arrays.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_arrays.py index 52cc98601bc..21e4cf531c4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_arrays.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_arrays.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.enum_arrays import EnumArrays # noqa: E501 -from petstore_api.rest import ApiException class TestEnumArrays(unittest.TestCase): """EnumArrays unit test stubs""" @@ -28,22 +26,25 @@ class TestEnumArrays(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> EnumArrays: """Test EnumArrays include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.enum_arrays.EnumArrays() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `EnumArrays` + """ + model = EnumArrays() # noqa: E501 + if include_optional: return EnumArrays( - just_symbol = '>=', + just_symbol = '>=', array_enum = [ 'fish' ] ) - else : + else: return EnumArrays( ) + """ def testEnumArrays(self): """Test EnumArrays""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_class.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_class.py index 9d7a81272cd..92822bcdd97 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_class.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.enum_class import EnumClass # noqa: E501 -from petstore_api.rest import ApiException class TestEnumClass(unittest.TestCase): """EnumClass unit test stubs""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_string1.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_string1.py index 9dbe9eb44fb..9cbeacbe344 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_string1.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_string1.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.enum_string1 import EnumString1 # noqa: E501 -from petstore_api.rest import ApiException class TestEnumString1(unittest.TestCase): """EnumString1 unit test stubs""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_string2.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_string2.py index 4ec0ffcd86c..409c7f257a5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_string2.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_string2.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.enum_string2 import EnumString2 # noqa: E501 -from petstore_api.rest import ApiException class TestEnumString2(unittest.TestCase): """EnumString2 unit test stubs""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_test.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_test.py index afb342ae934..a9f432cf9ce 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_enum_test.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.enum_test import EnumTest # noqa: E501 -from petstore_api.rest import ApiException class TestEnumTest(unittest.TestCase): """EnumTest unit test stubs""" @@ -28,27 +26,35 @@ class TestEnumTest(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> EnumTest: """Test EnumTest include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.enum_test.EnumTest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `EnumTest` + """ + model = EnumTest() # noqa: E501 + if include_optional: return EnumTest( - enum_string = 'UPPER', - enum_string_required = 'UPPER', - enum_integer = 1, - enum_number = 1.1, - outer_enum = 'placed', - outer_enum_integer = 2, - outer_enum_default_value = 'placed', - outer_enum_integer_default_value = 0 + enum_string = 'UPPER', + enum_string_required = 'UPPER', + enum_integer_default = 1, + enum_integer = 1, + enum_number = 1.1, + enum_number_vendor_ext = 42, + enum_string_vendor_ext = 'FOO', + enum_string_single_member = 'abc', + enum_integer_single_member = 100, + outer_enum = 'placed', + outer_enum_integer = 2, + outer_enum_default_value = 'placed', + outer_enum_integer_default_value = -1 ) - else : + else: return EnumTest( enum_string_required = 'UPPER', ) + """ def testEnumTest(self): """Test EnumTest""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_fake_api.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_fake_api.py index cf074093f90..dfe53c4b9e3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_fake_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_fake_api.py @@ -3,144 +3,277 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -try: - from unittest.mock import patch -except ImportError: - from mock import patch -import petstore_api from petstore_api.api.fake_api import FakeApi # noqa: E501 class TestFakeApi(unittest.TestCase): """FakeApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.fake_api.FakeApi() # noqa: E501 + def setUp(self) -> None: + self.api = FakeApi() - def tearDown(self): + def tearDown(self) -> None: + self.api.api_client.close() + + def test_fake_any_type_request_body(self) -> None: + """Test case for fake_any_type_request_body + + test any type request body # noqa: E501 + """ pass - def test_fake_health_get(self): + def test_fake_enum_ref_query_parameter(self) -> None: + """Test case for fake_enum_ref_query_parameter + + test enum reference query parameter # noqa: E501 + """ + pass + + def test_fake_health_get(self) -> None: """Test case for fake_health_get Health check endpoint # noqa: E501 """ pass - def test_fake_http_signature_test(self): + def test_fake_http_signature_test(self) -> None: """Test case for fake_http_signature_test test http signature authentication # noqa: E501 """ pass - def test_fake_outer_boolean_serialize(self): + def test_fake_outer_boolean_serialize(self) -> None: """Test case for fake_outer_boolean_serialize """ pass - def test_fake_outer_composite_serialize(self): + def test_fake_outer_composite_serialize(self) -> None: """Test case for fake_outer_composite_serialize """ pass - def test_fake_outer_number_serialize(self): + def test_fake_outer_number_serialize(self) -> None: """Test case for fake_outer_number_serialize """ pass - def test_fake_outer_string_serialize(self): + def test_fake_outer_string_serialize(self) -> None: """Test case for fake_outer_string_serialize """ pass - def test_test_body_with_file_schema(self): + def test_fake_property_enum_integer_serialize(self) -> None: + """Test case for fake_property_enum_integer_serialize + + """ + pass + + def test_fake_ref_enum_string(self) -> None: + """Test case for fake_ref_enum_string + + test ref to enum string # noqa: E501 + """ + pass + + def test_fake_return_boolean(self) -> None: + """Test case for fake_return_boolean + + test returning boolean # noqa: E501 + """ + pass + + def test_fake_return_byte_like_json(self) -> None: + """Test case for fake_return_byte_like_json + + test byte like json # noqa: E501 + """ + pass + + def test_fake_return_enum(self) -> None: + """Test case for fake_return_enum + + test returning enum # noqa: E501 + """ + pass + + def test_fake_return_enum_like_json(self) -> None: + """Test case for fake_return_enum_like_json + + test enum like json # noqa: E501 + """ + pass + + def test_fake_return_float(self) -> None: + """Test case for fake_return_float + + test returning float # noqa: E501 + """ + pass + + def test_fake_return_int(self) -> None: + """Test case for fake_return_int + + test returning int # noqa: E501 + """ + pass + + def test_fake_return_list_of_objects(self) -> None: + """Test case for fake_return_list_of_objects + + test returning list of objects # noqa: E501 + """ + pass + + def test_fake_return_str_like_json(self) -> None: + """Test case for fake_return_str_like_json + + test str like json # noqa: E501 + """ + pass + + def test_fake_return_string(self) -> None: + """Test case for fake_return_string + + test returning string # noqa: E501 + """ + pass + + def test_fake_uuid_example(self) -> None: + """Test case for fake_uuid_example + + test uuid example # noqa: E501 + """ + pass + + def test_test_additional_properties_reference(self) -> None: + """Test case for test_additional_properties_reference + + test referenced additionalProperties # noqa: E501 + """ + pass + + def test_test_body_with_binary(self) -> None: + """Test case for test_body_with_binary + + """ + pass + + def test_test_body_with_file_schema(self) -> None: """Test case for test_body_with_file_schema """ pass - def test_test_body_with_query_params(self): + def test_test_body_with_query_params(self) -> None: """Test case for test_body_with_query_params """ pass - def test_test_client_model(self): + def test_test_client_model(self) -> None: """Test case for test_client_model To test \"client\" model # noqa: E501 """ pass - def test_test_endpoint_parameters(self): + def test_test_date_time_query_parameter(self) -> None: + """Test case for test_date_time_query_parameter + + """ + pass + + def test_test_empty_and_non_empty_responses(self) -> None: + """Test case for test_empty_and_non_empty_responses + + test empty and non-empty responses # noqa: E501 + """ + pass + + def test_test_endpoint_parameters(self) -> None: """Test case for test_endpoint_parameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 """ pass - def test_test_enum_parameters(self): - """Test case for test_enum_parameters + def test_test_error_responses_with_model(self) -> None: + """Test case for test_error_responses_with_model - To test enum parameters # noqa: E501 + test error responses with model # noqa: E501 """ pass - def test_test_group_parameters(self): + def test_test_group_parameters(self) -> None: """Test case for test_group_parameters Fake endpoint to test group parameters (optional) # noqa: E501 """ pass - def test_test_inline_additional_properties(self): + def test_test_inline_additional_properties(self) -> None: """Test case for test_inline_additional_properties test inline additionalProperties # noqa: E501 """ pass - def test_test_json_form_data(self): + def test_test_inline_freeform_additional_properties(self) -> None: + """Test case for test_inline_freeform_additional_properties + + test inline free-form additionalProperties # noqa: E501 + """ + pass + + def test_test_json_form_data(self) -> None: """Test case for test_json_form_data test json serialization of form data # noqa: E501 """ pass - def test_test_query_parameter_collection_format(self): + def test_test_object_for_multipart_requests(self) -> None: + """Test case for test_object_for_multipart_requests + + """ + pass + + def test_test_query_parameter_collection_format(self) -> None: """Test case for test_query_parameter_collection_format """ pass - def test_headers_parameter(self): - """Test case for the _headers are passed by the user + def test_test_string_map_reference(self) -> None: + """Test case for test_string_map_reference - To test any optional parameter # noqa: E501 + test referenced string map # noqa: E501 """ - api = petstore_api.api.PetApi() - with patch("petstore_api.api_client.ApiClient.call_api") as mock_method: - value_headers = {"Header1": "value1"} - api.find_pets_by_status(["available"], _headers=value_headers) - args, _ = mock_method.call_args - self.assertEqual(args, ('/pet/findByStatus', 'GET', {}, [('status', ['available'])], {'Accept': 'application/json', 'Header1': 'value1'}) -) + pass + + def test_upload_file_with_additional_properties(self) -> None: + """Test case for upload_file_with_additional_properties + + uploads a file and additional properties using multipart/form-data # noqa: E501 + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_fake_classname_tags123_api.py index 25088624aea..54023ca230f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_fake_classname_tags123_api.py @@ -21,10 +21,10 @@ class TestFakeClassnameTags123Api(unittest.TestCase): """FakeClassnameTags123Api unit test stubs""" def setUp(self) -> None: - self.api = FakeClassnameTags123Api() # noqa: E501 + self.api = FakeClassnameTags123Api() def tearDown(self) -> None: - pass + self.api.api_client.close() def test_test_classname(self) -> None: """Test case for test_classname diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_field.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_field.py index c972d91444a..cb5e8e25dd2 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_field.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_field.py @@ -36,7 +36,7 @@ class TestField(unittest.TestCase): model = Field() # noqa: E501 if include_optional: return Field( - dummy = '' + field = '' ) else: return Field( diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_file.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_file.py index 3c9b91972d9..0896f1869db 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_file.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_file.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.file import File # noqa: E501 -from petstore_api.rest import ApiException class TestFile(unittest.TestCase): """File unit test stubs""" @@ -28,24 +26,27 @@ class TestFile(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> File: """Test File include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.file.File() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `File` + """ + model = File() # noqa: E501 + if include_optional: return File( source_uri = '' ) - else : + else: return File( ) + """ def testFile(self): """Test File""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_file_schema_test_class.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_file_schema_test_class.py index 2834ddc0541..72963bf91d5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_file_schema_test_class.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.file_schema_test_class import FileSchemaTestClass # noqa: E501 -from petstore_api.rest import ApiException class TestFileSchemaTestClass(unittest.TestCase): """FileSchemaTestClass unit test stubs""" @@ -28,29 +26,32 @@ class TestFileSchemaTestClass(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> FileSchemaTestClass: """Test FileSchemaTestClass include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.file_schema_test_class.FileSchemaTestClass() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `FileSchemaTestClass` + """ + model = FileSchemaTestClass() # noqa: E501 + if include_optional: return FileSchemaTestClass( file = petstore_api.models.file.File( - source_uri = '', ), + source_uri = '', ), files = [ petstore_api.models.file.File( source_uri = '', ) ] ) - else : + else: return FileSchemaTestClass( ) + """ def testFileSchemaTestClass(self): """Test FileSchemaTestClass""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_first_ref.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_first_ref.py index bcec1c0334b..a99fc7cfc79 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_first_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_first_ref.py @@ -3,23 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 -from __future__ import absolute_import - import unittest import datetime -import petstore_api from petstore_api.models.first_ref import FirstRef # noqa: E501 -from petstore_api.rest import ApiException class TestFirstRef(unittest.TestCase): """FirstRef unit test stubs""" @@ -30,17 +26,17 @@ class TestFirstRef(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> FirstRef: """Test FirstRef include_option 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 `FirstRef` """ - model = petstore_api.models.first_ref.FirstRef() # noqa: E501 - if include_optional : + model = FirstRef() # noqa: E501 + if include_optional: return FirstRef( - category = '', + category = '', self_ref = petstore_api.models.second_ref.SecondRef( category = '', circular_ref = petstore_api.models.circular_reference_model.Circular-Reference-Model( @@ -48,7 +44,7 @@ class TestFirstRef(unittest.TestCase): nested = petstore_api.models.first_ref.FirstRef( category = '', ), ), ) ) - else : + else: return FirstRef( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_foo.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_foo.py index f592b1c3701..f92679671c7 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_foo.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_foo.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.foo import Foo # noqa: E501 -from petstore_api.rest import ApiException class TestFoo(unittest.TestCase): """Foo unit test stubs""" @@ -28,24 +26,27 @@ class TestFoo(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Foo: """Test Foo include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.foo.Foo() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Foo` + """ + model = Foo() # noqa: E501 + if include_optional: return Foo( bar = 'bar' ) - else : + else: return Foo( ) + """ def testFoo(self): """Test Foo""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_foo_get_default_response.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_foo_get_default_response.py index d2cadc258d8..3a024f8e6c7 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_foo_get_default_response.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_foo_get_default_response.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.foo_get_default_response import FooGetDefaultResponse # noqa: E501 -from petstore_api.rest import ApiException class TestFooGetDefaultResponse(unittest.TestCase): """FooGetDefaultResponse unit test stubs""" @@ -28,25 +26,28 @@ class TestFooGetDefaultResponse(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> FooGetDefaultResponse: """Test FooGetDefaultResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.foo_get_default_response.FooGetDefaultResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `FooGetDefaultResponse` + """ + model = FooGetDefaultResponse() # noqa: E501 + if include_optional: return FooGetDefaultResponse( string = petstore_api.models.foo.Foo( bar = 'bar', ) ) - else : + else: return FooGetDefaultResponse( ) + """ def testFooGetDefaultResponse(self): """Test FooGetDefaultResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_format_test.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_format_test.py index 4d9f9bb8747..72c8965d491 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_format_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_format_test.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.format_test import FormatTest # noqa: E501 -from petstore_api.rest import ApiException class TestFormatTest(unittest.TestCase): """FormatTest unit test stubs""" @@ -28,45 +26,46 @@ class TestFormatTest(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> FormatTest: """Test FormatTest include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.format_test.FormatTest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `FormatTest` + """ + model = FormatTest() # noqa: E501 + if include_optional: return FormatTest( - integer = 10, - int32 = 20, - int64 = 56, - number = 132.1, - # TODO: pydantic v2: the "float" property aliases the "float" type in the pydantic v2 generator - # float = 54.3, - double = 67.8, - decimal = 1, - string = 'a', - byte = bytes("someting", 'utf-8'), - binary = bytes(b'blah'), - date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), - date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - uuid = '72f98069-206d-4f12-9f12-3d1e525a8e84', - password = '0123456789', - pattern_with_digits = '0480728880', + integer = 10, + int32 = 20, + int64 = 56, + number = 32.1, + float = 54.3, + double = 67.8, + decimal = 1, + string = 'a', + string_with_double_quote_pattern = 'this is \"something\"', + byte = 'YQ==', + binary = bytes(b'blah'), + var_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + uuid = '72f98069-206d-4f12-9f12-3d1e525a8e84', + password = '0123456789', + pattern_with_digits = '0480728880', pattern_with_digits_and_delimiter = 'image_480' ) - else : + else: return FormatTest( - number = 122.1, - byte = bytes("someting", 'utf-8'), - date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + number = 32.1, + var_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), password = '0123456789', ) + """ def testFormatTest(self): """Test FormatTest""" - inst_req_only = self.make_instance(include_optional=False) - # TODO - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_has_only_read_only.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_has_only_read_only.py index 2a8d2df6a0f..f106dda48d7 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_has_only_read_only.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.has_only_read_only import HasOnlyReadOnly # noqa: E501 -from petstore_api.rest import ApiException class TestHasOnlyReadOnly(unittest.TestCase): """HasOnlyReadOnly unit test stubs""" @@ -28,25 +26,28 @@ class TestHasOnlyReadOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> HasOnlyReadOnly: """Test HasOnlyReadOnly include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.has_only_read_only.HasOnlyReadOnly() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `HasOnlyReadOnly` + """ + model = HasOnlyReadOnly() # noqa: E501 + if include_optional: return HasOnlyReadOnly( - bar = '', + bar = '', foo = '' ) - else : + else: return HasOnlyReadOnly( ) + """ def testHasOnlyReadOnly(self): """Test HasOnlyReadOnly""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_health_check_result.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_health_check_result.py index 21c52053ea2..4f36cde5f8b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_health_check_result.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_health_check_result.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.health_check_result import HealthCheckResult # noqa: E501 -from petstore_api.rest import ApiException class TestHealthCheckResult(unittest.TestCase): """HealthCheckResult unit test stubs""" @@ -28,24 +26,27 @@ class TestHealthCheckResult(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> HealthCheckResult: """Test HealthCheckResult include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.health_check_result.HealthCheckResult() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `HealthCheckResult` + """ + model = HealthCheckResult() # noqa: E501 + if include_optional: return HealthCheckResult( nullable_message = '' ) - else : + else: return HealthCheckResult( ) + """ def testHealthCheckResult(self): """Test HealthCheckResult""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_import_test_datetime_api.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_import_test_datetime_api.py index 82e7781c082..3cf93fb8c67 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_import_test_datetime_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_import_test_datetime_api.py @@ -21,10 +21,10 @@ class TestImportTestDatetimeApi(unittest.TestCase): """ImportTestDatetimeApi unit test stubs""" def setUp(self) -> None: - self.api = ImportTestDatetimeApi() # noqa: E501 + self.api = ImportTestDatetimeApi() def tearDown(self) -> None: - pass + self.api.api_client.close() def test_import_test_return_datetime(self) -> None: """Test case for import_test_return_datetime diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_inner_dict_with_property.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_inner_dict_with_property.py index 8a63b70d552..1ba15fd984d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_inner_dict_with_property.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_inner_dict_with_property.py @@ -3,23 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 -from __future__ import absolute_import - import unittest import datetime -import petstore_api from petstore_api.models.inner_dict_with_property import InnerDictWithProperty # noqa: E501 -from petstore_api.rest import ApiException class TestInnerDictWithProperty(unittest.TestCase): """InnerDictWithProperty unit test stubs""" @@ -30,19 +26,19 @@ class TestInnerDictWithProperty(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InnerDictWithProperty: """Test InnerDictWithProperty include_option 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 `InnerDictWithProperty` """ - model = petstore_api.models.inner_dict_with_property.InnerDictWithProperty() # noqa: E501 - if include_optional : + model = InnerDictWithProperty() # noqa: E501 + if include_optional: return InnerDictWithProperty( a_property = None ) - else : + else: return InnerDictWithProperty( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_int_or_string.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_int_or_string.py index 0de76602cb6..41bf80d02cb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_int_or_string.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_int_or_string.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.int_or_string import IntOrString # noqa: E501 -from petstore_api.rest import ApiException class TestIntOrString(unittest.TestCase): """IntOrString unit test stubs""" @@ -28,18 +26,18 @@ class TestIntOrString(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> IntOrString: """Test IntOrString include_option 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 `IntOrString` """ - model = petstore_api.models.int_or_string.IntOrString() # noqa: E501 - if include_optional : + model = IntOrString() # noqa: E501 + if include_optional: return IntOrString( ) - else : + else: return IntOrString( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_map_of_array_of_model.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_map_of_array_of_model.py index 31ad486f5c0..2f88aa7935a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_map_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_map_of_array_of_model.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.map_of_array_of_model import MapOfArrayOfModel # noqa: E501 -from petstore_api.rest import ApiException class TestMapOfArrayOfModel(unittest.TestCase): """MapOfArrayOfModel unit test stubs""" @@ -28,15 +26,15 @@ class TestMapOfArrayOfModel(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> MapOfArrayOfModel: """Test MapOfArrayOfModel include_option 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 `MapOfArrayOfModel` """ - model = petstore_api.models.map_of_array_of_model.MapOfArrayOfModel() # noqa: E501 - if include_optional : + model = MapOfArrayOfModel() # noqa: E501 + if include_optional: return MapOfArrayOfModel( shop_id_to_org_online_lip_map = { 'key' : [ @@ -46,7 +44,7 @@ class TestMapOfArrayOfModel(unittest.TestCase): ] } ) - else : + else: return MapOfArrayOfModel( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_map_test.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_map_test.py index 5e11fed312a..8aedbfa8f66 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_map_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_map_test.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.map_test import MapTest # noqa: E501 -from petstore_api.rest import ApiException class TestMapTest(unittest.TestCase): """MapTest unit test stubs""" @@ -28,38 +26,40 @@ class TestMapTest(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> MapTest: """Test MapTest include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.map_test.MapTest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `MapTest` + """ + model = MapTest() # noqa: E501 + if include_optional: return MapTest( map_map_of_string = { 'key' : { 'key' : '' } - }, + }, map_of_enum_string = { 'UPPER' : 'UPPER' - }, + }, direct_map = { 'key' : True - }, + }, indirect_map = { 'key' : True } ) - else : + else: return MapTest( ) + """ def testMapTest(self): """Test MapTest""" - # TODO - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_mixed_properties_and_additional_properties_class.py index d217b114365..12a96998a56 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_mixed_properties_and_additional_properties_class.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass # noqa: E501 -from petstore_api.rest import ApiException class TestMixedPropertiesAndAdditionalPropertiesClass(unittest.TestCase): """MixedPropertiesAndAdditionalPropertiesClass unit test stubs""" @@ -28,30 +26,33 @@ class TestMixedPropertiesAndAdditionalPropertiesClass(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> MixedPropertiesAndAdditionalPropertiesClass: """Test MixedPropertiesAndAdditionalPropertiesClass include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.mixed_properties_and_additional_properties_class.MixedPropertiesAndAdditionalPropertiesClass() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `MixedPropertiesAndAdditionalPropertiesClass` + """ + model = MixedPropertiesAndAdditionalPropertiesClass() # noqa: E501 + if include_optional: return MixedPropertiesAndAdditionalPropertiesClass( - uuid = '', - date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + uuid = '', + date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), map = { 'key' : petstore_api.models.animal.Animal( class_name = '', color = 'red', ) } ) - else : + else: return MixedPropertiesAndAdditionalPropertiesClass( ) + """ def testMixedPropertiesAndAdditionalPropertiesClass(self): """Test MixedPropertiesAndAdditionalPropertiesClass""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_model200_response.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_model200_response.py index f7e9677e007..f5e65f1aca4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_model200_response.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_model200_response.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.model200_response import Model200Response # noqa: E501 -from petstore_api.rest import ApiException class TestModel200Response(unittest.TestCase): """Model200Response unit test stubs""" @@ -28,25 +26,28 @@ class TestModel200Response(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Model200Response: """Test Model200Response include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.model200_response.Model200Response() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Model200Response` + """ + model = Model200Response() # noqa: E501 + if include_optional: return Model200Response( - name = 56, - _class = '' + name = 56, + var_class = '' ) - else : + else: return Model200Response( ) + """ def testModel200Response(self): """Test Model200Response""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_model_return.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_model_return.py index b0f9d9c4f7f..e011892fb0b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_model_return.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_model_return.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.model_return import ModelReturn # noqa: E501 -from petstore_api.rest import ApiException class TestModelReturn(unittest.TestCase): """ModelReturn unit test stubs""" @@ -28,24 +26,27 @@ class TestModelReturn(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ModelReturn: """Test ModelReturn include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.model_return.ModelReturn() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ModelReturn` + """ + model = ModelReturn() # noqa: E501 + if include_optional: return ModelReturn( - _return = 56 + var_return = 56 ) - else : + else: return ModelReturn( ) + """ def testModelReturn(self): """Test ModelReturn""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_name.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_name.py index bbf11fd231e..be7ddc8461d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_name.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.name import Name # noqa: E501 -from petstore_api.rest import ApiException class TestName(unittest.TestCase): """Name unit test stubs""" @@ -28,28 +26,31 @@ class TestName(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Name: """Test Name include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.name.Name() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Name` + """ + model = Name() # noqa: E501 + if include_optional: return Name( - name = 56, - snake_case = 56, - _property = '', - _123_number = 56 + name = 56, + snake_case = 56, + var_property = '', + var_123_number = 56 ) - else : + else: return Name( name = 56, ) + """ def testName(self): """Test Name""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_nullable_class.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_nullable_class.py index 7aa59f46bbd..b1170db23c4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_nullable_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_nullable_class.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.nullable_class import NullableClass # noqa: E501 -from petstore_api.rest import ApiException class TestNullableClass(unittest.TestCase): """NullableClass unit test stubs""" @@ -28,50 +26,52 @@ class TestNullableClass(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NullableClass: """Test NullableClass include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.nullable_class.NullableClass() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `NullableClass` + """ + model = NullableClass() # noqa: E501 + if include_optional: return NullableClass( required_integer_prop = 56, - integer_prop = 56, - number_prop = 1.337, - boolean_prop = True, - string_prop = '', - date_prop = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), - datetime_prop = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + integer_prop = 56, + number_prop = 1.337, + boolean_prop = True, + string_prop = '', + date_prop = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + datetime_prop = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), array_nullable_prop = [ None - ], + ], array_and_items_nullable_prop = [ None - ], + ], array_items_nullable = [ None - ], + ], object_nullable_prop = { 'key' : None - }, + }, object_and_items_nullable_prop = { 'key' : None - }, + }, object_items_nullable = { 'key' : None } ) - else : + else: return NullableClass( - required_integer_prop = 56 + required_integer_prop = 56, ) + """ def testNullableClass(self): """Test NullableClass""" - # TODO - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_nullable_property.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_nullable_property.py index 34129457b1d..aa34b84e797 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_nullable_property.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_nullable_property.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.nullable_property import NullableProperty # noqa: E501 -from petstore_api.rest import ApiException class TestNullableProperty(unittest.TestCase): """NullableProperty unit test stubs""" @@ -28,20 +26,20 @@ class TestNullableProperty(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NullableProperty: """Test NullableProperty include_option 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 `NullableProperty` """ - model = petstore_api.models.nullable_property.NullableProperty() # noqa: E501 - if include_optional : + model = NullableProperty() # noqa: E501 + if include_optional: return NullableProperty( - id = 56, + id = 56, name = 'AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>' ) - else : + else: return NullableProperty( id = 56, name = 'AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>', diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_number_only.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_number_only.py index 776946c3d77..cfc8c5c778c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_number_only.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.number_only import NumberOnly # noqa: E501 -from petstore_api.rest import ApiException class TestNumberOnly(unittest.TestCase): """NumberOnly unit test stubs""" @@ -28,24 +26,27 @@ class TestNumberOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NumberOnly: """Test NumberOnly include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.number_only.NumberOnly() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `NumberOnly` + """ + model = NumberOnly() # noqa: E501 + if include_optional: return NumberOnly( just_number = 1.337 ) - else : + else: return NumberOnly( ) + """ def testNumberOnly(self): """Test NumberOnly""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_object_to_test_additional_properties.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_object_to_test_additional_properties.py index f1f354cad25..d080b21afb3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_object_to_test_additional_properties.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_object_to_test_additional_properties.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.object_to_test_additional_properties import ObjectToTestAdditionalProperties # noqa: E501 -from petstore_api.rest import ApiException class TestObjectToTestAdditionalProperties(unittest.TestCase): """ObjectToTestAdditionalProperties unit test stubs""" @@ -28,19 +26,19 @@ class TestObjectToTestAdditionalProperties(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ObjectToTestAdditionalProperties: """Test ObjectToTestAdditionalProperties include_option 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 `ObjectToTestAdditionalProperties` """ - model = petstore_api.models.object_to_test_additional_properties.ObjectToTestAdditionalProperties() # noqa: E501 - if include_optional : + model = ObjectToTestAdditionalProperties() # noqa: E501 + if include_optional: return ObjectToTestAdditionalProperties( var_property = True ) - else : + else: return ObjectToTestAdditionalProperties( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_object_with_deprecated_fields.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_object_with_deprecated_fields.py index e0cbf3e98a5..5f04c63a3cb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_object_with_deprecated_fields.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_object_with_deprecated_fields.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.object_with_deprecated_fields import ObjectWithDeprecatedFields # noqa: E501 -from petstore_api.rest import ApiException class TestObjectWithDeprecatedFields(unittest.TestCase): """ObjectWithDeprecatedFields unit test stubs""" @@ -28,30 +26,33 @@ class TestObjectWithDeprecatedFields(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ObjectWithDeprecatedFields: """Test ObjectWithDeprecatedFields include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.object_with_deprecated_fields.ObjectWithDeprecatedFields() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ObjectWithDeprecatedFields` + """ + model = ObjectWithDeprecatedFields() # noqa: E501 + if include_optional: return ObjectWithDeprecatedFields( - uuid = '', - id = 1.337, + uuid = '', + id = 1.337, deprecated_ref = petstore_api.models.deprecated_object.DeprecatedObject( - name = '', ), + name = '', ), bars = [ 'bar' ] ) - else : + else: return ObjectWithDeprecatedFields( ) + """ def testObjectWithDeprecatedFields(self): """Test ObjectWithDeprecatedFields""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_one_of_enum_string.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_one_of_enum_string.py index ed959c1479c..3db614a16ca 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_one_of_enum_string.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_one_of_enum_string.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.one_of_enum_string import OneOfEnumString # noqa: E501 -from petstore_api.rest import ApiException class TestOneOfEnumString(unittest.TestCase): """OneOfEnumString unit test stubs""" @@ -28,18 +26,18 @@ class TestOneOfEnumString(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> OneOfEnumString: """Test OneOfEnumString include_option 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 `OneOfEnumString` """ - model = petstore_api.models.one_of_enum_string.OneOfEnumString() # noqa: E501 - if include_optional : + model = OneOfEnumString() # noqa: E501 + if include_optional: return OneOfEnumString( ) - else : + else: return OneOfEnumString( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_order.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_order.py index d6ec36f83a0..3334ed8f949 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_order.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_order.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.order import Order # noqa: E501 -from petstore_api.rest import ApiException class TestOrder(unittest.TestCase): """Order unit test stubs""" @@ -28,29 +26,32 @@ class TestOrder(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Order: """Test Order include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.order.Order() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Order` + """ + model = Order() # noqa: E501 + if include_optional: return Order( - id = 56, - pet_id = 56, - quantity = 56, - ship_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - status = 'placed', + id = 56, + pet_id = 56, + quantity = 56, + ship_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 'placed', complete = True ) - else : + else: return Order( ) + """ def testOrder(self): """Test Order""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_composite.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_composite.py index c6fd5884937..7df32d8c672 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_composite.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_composite.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.outer_composite import OuterComposite # noqa: E501 -from petstore_api.rest import ApiException class TestOuterComposite(unittest.TestCase): """OuterComposite unit test stubs""" @@ -28,26 +26,29 @@ class TestOuterComposite(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> OuterComposite: """Test OuterComposite include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.outer_composite.OuterComposite() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `OuterComposite` + """ + model = OuterComposite() # noqa: E501 + if include_optional: return OuterComposite( - my_number = 1.337, - my_string = '', + my_number = 1.337, + my_string = '', my_boolean = True ) - else : + else: return OuterComposite( ) + """ def testOuterComposite(self): """Test OuterComposite""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum.py index aa195260019..5da04a9a45c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.outer_enum import OuterEnum # noqa: E501 -from petstore_api.rest import ApiException class TestOuterEnum(unittest.TestCase): """OuterEnum unit test stubs""" @@ -30,7 +28,7 @@ class TestOuterEnum(unittest.TestCase): def testOuterEnum(self): """Test OuterEnum""" - inst = OuterEnum("placed") + # inst = OuterEnum() if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum_default_value.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum_default_value.py index f8fba3bd79a..df6499565fd 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum_default_value.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum_default_value.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.outer_enum_default_value import OuterEnumDefaultValue # noqa: E501 -from petstore_api.rest import ApiException class TestOuterEnumDefaultValue(unittest.TestCase): """OuterEnumDefaultValue unit test stubs""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum_integer.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum_integer.py index ce1e47c61b1..7b89b806ba2 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum_integer.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum_integer.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.outer_enum_integer import OuterEnumInteger # noqa: E501 -from petstore_api.rest import ApiException class TestOuterEnumInteger(unittest.TestCase): """OuterEnumInteger unit test stubs""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum_integer_default_value.py index f0b707fca77..532616fdee1 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_enum_integer_default_value.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.outer_enum_integer_default_value import OuterEnumIntegerDefaultValue # noqa: E501 -from petstore_api.rest import ApiException class TestOuterEnumIntegerDefaultValue(unittest.TestCase): """OuterEnumIntegerDefaultValue unit test stubs""" @@ -28,23 +26,9 @@ class TestOuterEnumIntegerDefaultValue(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): - """Test OuterEnumIntegerDefaultValue - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = petstore_api.models.outer_enum_integer_default_value.OuterEnumIntegerDefaultValue() # noqa: E501 - if include_optional : - return OuterEnumIntegerDefaultValue( - ) - else : - return OuterEnumIntegerDefaultValue( - ) - def testOuterEnumIntegerDefaultValue(self): """Test OuterEnumIntegerDefaultValue""" - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst = OuterEnumIntegerDefaultValue() if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_object_with_enum_property.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_object_with_enum_property.py index 35258d5d74a..27e518b0059 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_object_with_enum_property.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_outer_object_with_enum_property.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty # noqa: E501 -from petstore_api.rest import ApiException class TestOuterObjectWithEnumProperty(unittest.TestCase): """OuterObjectWithEnumProperty unit test stubs""" @@ -28,20 +26,24 @@ class TestOuterObjectWithEnumProperty(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> OuterObjectWithEnumProperty: """Test OuterObjectWithEnumProperty include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.outer_object_with_enum_property.OuterObjectWithEnumProperty() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `OuterObjectWithEnumProperty` + """ + model = OuterObjectWithEnumProperty() # noqa: E501 + if include_optional: return OuterObjectWithEnumProperty( + str_value = 'placed', value = 2 ) - else : + else: return OuterObjectWithEnumProperty( value = 2, ) + """ def testOuterObjectWithEnumProperty(self): """Test OuterObjectWithEnumProperty""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_parent.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_parent.py index 2a74505f08a..ea206970c9c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_parent.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_parent.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.parent import Parent # noqa: E501 -from petstore_api.rest import ApiException class TestParent(unittest.TestCase): """Parent unit test stubs""" @@ -28,22 +26,22 @@ class TestParent(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Parent: """Test Parent include_option 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 `Parent` """ - model = petstore_api.models.parent.Parent() # noqa: E501 - if include_optional : + model = Parent() # noqa: E501 + if include_optional: return Parent( optional_dict = { 'key' : petstore_api.models.inner_dict_with_property.InnerDictWithProperty( a_property = petstore_api.models.a_property.aProperty(), ) } ) - else : + else: return Parent( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_parent_with_optional_dict.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_parent_with_optional_dict.py index 25b769e3d39..2c668a7047a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_parent_with_optional_dict.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_parent_with_optional_dict.py @@ -3,23 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 -from __future__ import absolute_import - import unittest import datetime -import petstore_api from petstore_api.models.parent_with_optional_dict import ParentWithOptionalDict # noqa: E501 -from petstore_api.rest import ApiException class TestParentWithOptionalDict(unittest.TestCase): """ParentWithOptionalDict unit test stubs""" @@ -30,22 +26,22 @@ class TestParentWithOptionalDict(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ParentWithOptionalDict: """Test ParentWithOptionalDict include_option 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 `ParentWithOptionalDict` """ - model = petstore_api.models.parent_with_optional_dict.ParentWithOptionalDict() # noqa: E501 - if include_optional : + model = ParentWithOptionalDict() # noqa: E501 + if include_optional: return ParentWithOptionalDict( optional_dict = { 'key' : petstore_api.models.inner_dict_with_property.InnerDictWithProperty( a_property = petstore_api.models.a_property.aProperty(), ) } ) - else : + else: return ParentWithOptionalDict( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_pet.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_pet.py index 6d3fd2f35b0..f89e6cdf4b4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_pet.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_pet.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.pet import Pet # noqa: E501 -from petstore_api.rest import ApiException class TestPet(unittest.TestCase): """Pet unit test stubs""" @@ -28,41 +26,44 @@ class TestPet(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Pet: """Test Pet include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.pet.Pet() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Pet` + """ + model = Pet() # noqa: E501 + if include_optional: return Pet( - id = 56, + id = 56, category = petstore_api.models.category.Category( id = 56, - name = 'default-name', ), - name = 'doggie', + name = 'default-name', ), + name = 'doggie', photo_urls = [ '' - ], + ], tags = [ petstore_api.models.tag.Tag( id = 56, name = '', ) - ], + ], status = 'available' ) - else : + 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) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_pet_api.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_pet_api.py index 77665df879f..e65100ff31f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_pet_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_pet_api.py @@ -3,88 +3,86 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import petstore_api from petstore_api.api.pet_api import PetApi # noqa: E501 -from petstore_api.rest import ApiException class TestPetApi(unittest.TestCase): """PetApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.pet_api.PetApi() # noqa: E501 + def setUp(self) -> None: + self.api = PetApi() - def tearDown(self): - pass + def tearDown(self) -> None: + self.api.api_client.close() - def test_add_pet(self): + def test_add_pet(self) -> None: """Test case for add_pet Add a new pet to the store # noqa: E501 """ pass - def test_delete_pet(self): + def test_delete_pet(self) -> None: """Test case for delete_pet Deletes a pet # noqa: E501 """ pass - def test_find_pets_by_status(self): + def test_find_pets_by_status(self) -> None: """Test case for find_pets_by_status Finds Pets by status # noqa: E501 """ pass - def test_find_pets_by_tags(self): + def test_find_pets_by_tags(self) -> None: """Test case for find_pets_by_tags Finds Pets by tags # noqa: E501 """ pass - def test_get_pet_by_id(self): + def test_get_pet_by_id(self) -> None: """Test case for get_pet_by_id Find pet by ID # noqa: E501 """ pass - def test_update_pet(self): + def test_update_pet(self) -> None: """Test case for update_pet Update an existing pet # noqa: E501 """ pass - def test_update_pet_with_form(self): + def test_update_pet_with_form(self) -> None: """Test case for update_pet_with_form Updates a pet in the store with form data # noqa: E501 """ pass - def test_upload_file(self): + def test_upload_file(self) -> None: """Test case for upload_file uploads an image # noqa: E501 """ pass - def test_upload_file_with_required_file(self): + def test_upload_file_with_required_file(self) -> None: """Test case for upload_file_with_required_file uploads an image (required) # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_pig.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_pig.py index 95e99f35a73..cd3f112aabc 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_pig.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.pig import Pig # noqa: E501 -from petstore_api.rest import ApiException class TestPig(unittest.TestCase): """Pig unit test stubs""" @@ -28,6 +26,28 @@ class TestPig(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Pig: + """Test Pig + include_option 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 `Pig` + """ + model = Pig() # noqa: E501 + if include_optional: + return Pig( + class_name = '', + color = '', + size = 56 + ) + else: + return Pig( + class_name = '', + color = '', + size = 56, + ) + """ + def testPig(self): """Test Pig""" # inst_req_only = self.make_instance(include_optional=False) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_property_name_collision.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_property_name_collision.py index 04ab956f191..a869945b320 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_property_name_collision.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_property_name_collision.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.property_name_collision import PropertyNameCollision # noqa: E501 -from petstore_api.rest import ApiException class TestPropertyNameCollision(unittest.TestCase): """PropertyNameCollision unit test stubs""" @@ -28,21 +26,21 @@ class TestPropertyNameCollision(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PropertyNameCollision: """Test PropertyNameCollision include_option 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 `PropertyNameCollision` """ - model = petstore_api.models.property_name_collision.PropertyNameCollision() # noqa: E501 - if include_optional : + model = PropertyNameCollision() # noqa: E501 + if include_optional: return PropertyNameCollision( - underscoreType = '', - type = '', - typeWithUnderscore = '' + underscore_type = '', + type = '', + type_with_underscore = '' ) - else : + else: return PropertyNameCollision( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_read_only_first.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_read_only_first.py index 310e4b1aebb..1026a73205d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_read_only_first.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_read_only_first.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.read_only_first import ReadOnlyFirst # noqa: E501 -from petstore_api.rest import ApiException class TestReadOnlyFirst(unittest.TestCase): """ReadOnlyFirst unit test stubs""" @@ -28,25 +26,28 @@ class TestReadOnlyFirst(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ReadOnlyFirst: """Test ReadOnlyFirst include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.read_only_first.ReadOnlyFirst() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ReadOnlyFirst` + """ + model = ReadOnlyFirst() # noqa: E501 + if include_optional: return ReadOnlyFirst( - bar = '', + bar = '', baz = '' ) - else : + else: return ReadOnlyFirst( ) + """ def testReadOnlyFirst(self): """Test ReadOnlyFirst""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_second_circular_all_of_ref.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_second_circular_all_of_ref.py index 3b9a26f72d8..c1ef0d1b7db 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_second_circular_all_of_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_second_circular_all_of_ref.py @@ -36,13 +36,10 @@ class TestSecondCircularAllOfRef(unittest.TestCase): model = SecondCircularAllOfRef() # noqa: E501 if include_optional: return SecondCircularAllOfRef( + name = '', circular_all_of_ref = [ - petstore_api.models.circular_all_of_ref.CircularAllOfRef( - second_circular_all_of_ref = [ - petstore_api.models.second_circular_all_of_ref.SecondCircularAllOfRef() - ], ) - ], - name = '' + petstore_api.models.circular_all_of_ref.CircularAllOfRef() + ] ) else: return SecondCircularAllOfRef( diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_second_ref.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_second_ref.py index 782892fd4e1..44194f94544 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_second_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_second_ref.py @@ -3,23 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 -from __future__ import absolute_import - import unittest import datetime -import petstore_api from petstore_api.models.second_ref import SecondRef # noqa: E501 -from petstore_api.rest import ApiException class TestSecondRef(unittest.TestCase): """SecondRef unit test stubs""" @@ -30,17 +26,17 @@ class TestSecondRef(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SecondRef: """Test SecondRef include_option 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 `SecondRef` """ - model = petstore_api.models.second_ref.SecondRef() # noqa: E501 - if include_optional : + model = SecondRef() # noqa: E501 + if include_optional: return SecondRef( - category = '', + category = '', circular_ref = petstore_api.models.circular_reference_model.Circular-Reference-Model( size = 56, nested = petstore_api.models.first_ref.FirstRef( @@ -48,7 +44,7 @@ class TestSecondRef(unittest.TestCase): self_ref = petstore_api.models.second_ref.SecondRef( category = '', ), ), ) ) - else : + else: return SecondRef( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_self_reference_model.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_self_reference_model.py index b3dd7ada2b2..8c23008b26e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_self_reference_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_self_reference_model.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.self_reference_model import SelfReferenceModel # noqa: E501 -from petstore_api.rest import ApiException class TestSelfReferenceModel(unittest.TestCase): """SelfReferenceModel unit test stubs""" @@ -28,17 +26,17 @@ class TestSelfReferenceModel(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SelfReferenceModel: """Test SelfReferenceModel include_option 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 `SelfReferenceModel` """ - model = petstore_api.models.self_reference_model.SelfReferenceModel() # noqa: E501 - if include_optional : + model = SelfReferenceModel() # noqa: E501 + if include_optional: return SelfReferenceModel( - size = 56, + size = 56, nested = petstore_api.models.dummy_model.Dummy-Model( category = '', self_ref = petstore_api.models.self_reference_model.Self-Reference-Model( @@ -46,7 +44,7 @@ class TestSelfReferenceModel(unittest.TestCase): nested = petstore_api.models.dummy_model.Dummy-Model( category = '', ), ), ) ) - else : + else: return SelfReferenceModel( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_single_ref_type.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_single_ref_type.py index 888a1a7b6da..f5642b8376b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_single_ref_type.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_single_ref_type.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.single_ref_type import SingleRefType # noqa: E501 -from petstore_api.rest import ApiException class TestSingleRefType(unittest.TestCase): """SingleRefType unit test stubs""" @@ -28,23 +26,9 @@ class TestSingleRefType(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): - """Test SingleRefType - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = petstore_api.models.single_ref_type.SingleRefType() # noqa: E501 - if include_optional : - return SingleRefType( - ) - else : - return SingleRefType( - ) - def testSingleRefType(self): """Test SingleRefType""" - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst = SingleRefType() if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_special_character_enum.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_special_character_enum.py index 028f55599e4..ee5baab1309 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_special_character_enum.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_special_character_enum.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.special_character_enum import SpecialCharacterEnum # noqa: E501 -from petstore_api.rest import ApiException class TestSpecialCharacterEnum(unittest.TestCase): """SpecialCharacterEnum unit test stubs""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_special_model_name.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_special_model_name.py index eb487cd42fc..12ec90a9067 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_special_model_name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_special_model_name.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.special_model_name import SpecialModelName # noqa: E501 -from petstore_api.rest import ApiException class TestSpecialModelName(unittest.TestCase): """SpecialModelName unit test stubs""" @@ -28,24 +26,27 @@ class TestSpecialModelName(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SpecialModelName: """Test SpecialModelName include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.special_model_name.SpecialModelName() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SpecialModelName` + """ + model = SpecialModelName() # noqa: E501 + if include_optional: return SpecialModelName( special_property_name = 56 ) - else : + else: return SpecialModelName( ) + """ def testSpecialModelName(self): """Test SpecialModelName""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_special_name.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_special_name.py index 1f4287871a8..afaf0996b74 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_special_name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_special_name.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.special_name import SpecialName # noqa: E501 -from petstore_api.rest import ApiException class TestSpecialName(unittest.TestCase): """SpecialName unit test stubs""" @@ -28,23 +26,23 @@ class TestSpecialName(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SpecialName: """Test SpecialName include_option 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 `SpecialName` """ - model = petstore_api.models.special_name.SpecialName() # noqa: E501 - if include_optional : + model = SpecialName() # noqa: E501 + if include_optional: return SpecialName( - var_property = 56, + var_property = 56, var_async = petstore_api.models.category.Category( id = 56, - name = 'default-name', ), - status = 'available' + name = 'default-name', ), + var_schema = 'available' ) - else : + else: return SpecialName( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_store_api.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_store_api.py index 81848d24a67..eaf61a726d9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_store_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_store_api.py @@ -3,53 +3,51 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import petstore_api from petstore_api.api.store_api import StoreApi # noqa: E501 -from petstore_api.rest import ApiException class TestStoreApi(unittest.TestCase): """StoreApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.store_api.StoreApi() # noqa: E501 + def setUp(self) -> None: + self.api = StoreApi() - def tearDown(self): - pass + def tearDown(self) -> None: + self.api.api_client.close() - def test_delete_order(self): + def test_delete_order(self) -> None: """Test case for delete_order Delete purchase order by ID # noqa: E501 """ pass - def test_get_inventory(self): + def test_get_inventory(self) -> None: """Test case for get_inventory Returns pet inventories by status # noqa: E501 """ pass - def test_get_order_by_id(self): + def test_get_order_by_id(self) -> None: """Test case for get_order_by_id Find purchase order by ID # noqa: E501 """ pass - def test_place_order(self): + def test_place_order(self) -> None: """Test case for place_order Place an order for a pet # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_tag.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_tag.py index 9680300032f..d5ce3fb8a0c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_tag.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_tag.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.tag import Tag # noqa: E501 -from petstore_api.rest import ApiException class TestTag(unittest.TestCase): """Tag unit test stubs""" @@ -28,25 +26,28 @@ class TestTag(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Tag: """Test Tag include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.tag.Tag() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Tag` + """ + model = Tag() # noqa: E501 + if include_optional: return Tag( - id = 56, + id = 56, name = '' ) - else : + else: return Tag( ) + """ def testTag(self): """Test Tag""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_tiger.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_tiger.py index 83c91cea1a0..7aab61a4606 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_tiger.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_tiger.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest import datetime -import petstore_api from petstore_api.models.tiger import Tiger # noqa: E501 -from petstore_api.rest import ApiException class TestTiger(unittest.TestCase): """Tiger unit test stubs""" @@ -28,19 +26,19 @@ class TestTiger(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Tiger: """Test Tiger include_option 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 `Tiger` """ - model = petstore_api.models.tiger.Tiger() # noqa: E501 - if include_optional : + model = Tiger() # noqa: E501 + if include_optional: return Tiger( skill = '' ) - else : + else: return Tiger( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_user.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_user.py index 174c8e06be5..a1ce46e87a1 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_user.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_user.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.user import User # noqa: E501 -from petstore_api.rest import ApiException class TestUser(unittest.TestCase): """User unit test stubs""" @@ -28,31 +26,34 @@ class TestUser(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> User: """Test User include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.user.User() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `User` + """ + model = User() # noqa: E501 + if include_optional: return User( - id = 56, - username = '', - first_name = '', - last_name = '', - email = '', - password = '', - phone = '', + id = 56, + username = '', + first_name = '', + last_name = '', + email = '', + password = '', + phone = '', user_status = 56 ) - else : + else: return User( ) + """ def testUser(self): """Test User""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_user_api.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_user_api.py index 6df730fba2b..a7067583c74 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_user_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_user_api.py @@ -3,81 +3,79 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import petstore_api from petstore_api.api.user_api import UserApi # noqa: E501 -from petstore_api.rest import ApiException class TestUserApi(unittest.TestCase): """UserApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.user_api.UserApi() # noqa: E501 + def setUp(self) -> None: + self.api = UserApi() - def tearDown(self): - pass + def tearDown(self) -> None: + self.api.api_client.close() - def test_create_user(self): + def test_create_user(self) -> None: """Test case for create_user Create user # noqa: E501 """ pass - def test_create_users_with_array_input(self): + def test_create_users_with_array_input(self) -> None: """Test case for create_users_with_array_input Creates list of users with given input array # noqa: E501 """ pass - def test_create_users_with_list_input(self): + def test_create_users_with_list_input(self) -> None: """Test case for create_users_with_list_input Creates list of users with given input array # noqa: E501 """ pass - def test_delete_user(self): + def test_delete_user(self) -> None: """Test case for delete_user Delete user # noqa: E501 """ pass - def test_get_user_by_name(self): + def test_get_user_by_name(self) -> None: """Test case for get_user_by_name Get user by user name # noqa: E501 """ pass - def test_login_user(self): + def test_login_user(self) -> None: """Test case for login_user Logs user into the system # noqa: E501 """ pass - def test_logout_user(self): + def test_logout_user(self) -> None: """Test case for logout_user Logs out current logged in user session # noqa: E501 """ pass - def test_update_user(self): + def test_update_user(self) -> None: """Test case for update_user Updated user # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_with_nested_one_of.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_with_nested_one_of.py index 994004dd7ab..43c4a69a29b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_with_nested_one_of.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_with_nested_one_of.py @@ -3,21 +3,19 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest import datetime -import petstore_api from petstore_api.models.with_nested_one_of import WithNestedOneOf # noqa: E501 -from petstore_api.rest import ApiException class TestWithNestedOneOf(unittest.TestCase): """WithNestedOneOf unit test stubs""" @@ -28,25 +26,29 @@ class TestWithNestedOneOf(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> WithNestedOneOf: """Test WithNestedOneOf include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.with_nested_one_of.WithNestedOneOf() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `WithNestedOneOf` + """ + model = WithNestedOneOf() # noqa: E501 + if include_optional: return WithNestedOneOf( - size = 56, - nested_pig = None + size = 56, + nested_pig = None, + nested_oneof_enum_string = None ) - else : + else: return WithNestedOneOf( ) + """ def testWithNestedOneOf(self): """Test WithNestedOneOf""" - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_additional_properties_any_type.py b/samples/openapi3/client/petstore/python/test/test_additional_properties_any_type.py index c2c9c7c5806..48603ddb403 100644 --- a/samples/openapi3/client/petstore/python/test/test_additional_properties_any_type.py +++ b/samples/openapi3/client/petstore/python/test/test_additional_properties_any_type.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.additional_properties_any_type import AdditionalPropertiesAnyType # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.additional_properties_any_type import AdditionalPropertiesAnyType class TestAdditionalPropertiesAnyType(unittest.TestCase): """AdditionalPropertiesAnyType unit test stubs""" @@ -28,19 +25,19 @@ class TestAdditionalPropertiesAnyType(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AdditionalPropertiesAnyType: """Test AdditionalPropertiesAnyType - include_option is a boolean, when False only required + 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 `AdditionalPropertiesAnyType` """ - model = petstore_api.models.additional_properties_any_type.AdditionalPropertiesAnyType() # noqa: E501 - if include_optional : + model = AdditionalPropertiesAnyType() + if include_optional: return AdditionalPropertiesAnyType( name = '' ) - else : + else: return AdditionalPropertiesAnyType( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_additional_properties_class.py b/samples/openapi3/client/petstore/python/test/test_additional_properties_class.py index e3b48bedd57..0261c8f4a00 100644 --- a/samples/openapi3/client/petstore/python/test/test_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/test/test_additional_properties_class.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.additional_properties_class import AdditionalPropertiesClass # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.additional_properties_class import AdditionalPropertiesClass class TestAdditionalPropertiesClass(unittest.TestCase): """AdditionalPropertiesClass unit test stubs""" @@ -28,26 +25,26 @@ class TestAdditionalPropertiesClass(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AdditionalPropertiesClass: """Test AdditionalPropertiesClass - include_option is a boolean, when False only required + 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 `AdditionalPropertiesClass` """ - model = petstore_api.models.additional_properties_class.AdditionalPropertiesClass() # noqa: E501 - if include_optional : + model = AdditionalPropertiesClass() + if include_optional: return AdditionalPropertiesClass( map_property = { 'key' : '' - }, + }, map_of_map_property = { 'key' : { 'key' : '' } } ) - else : + else: return AdditionalPropertiesClass( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_additional_properties_object.py b/samples/openapi3/client/petstore/python/test/test_additional_properties_object.py index b68a8fda579..8b0dccef564 100644 --- a/samples/openapi3/client/petstore/python/test/test_additional_properties_object.py +++ b/samples/openapi3/client/petstore/python/test/test_additional_properties_object.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.additional_properties_object import AdditionalPropertiesObject # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.additional_properties_object import AdditionalPropertiesObject class TestAdditionalPropertiesObject(unittest.TestCase): """AdditionalPropertiesObject unit test stubs""" @@ -28,19 +25,19 @@ class TestAdditionalPropertiesObject(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AdditionalPropertiesObject: """Test AdditionalPropertiesObject - include_option is a boolean, when False only required + 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 `AdditionalPropertiesObject` """ - model = petstore_api.models.additional_properties_object.AdditionalPropertiesObject() # noqa: E501 - if include_optional : + model = AdditionalPropertiesObject() + if include_optional: return AdditionalPropertiesObject( name = '' ) - else : + else: return AdditionalPropertiesObject( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_additional_properties_with_description_only.py b/samples/openapi3/client/petstore/python/test/test_additional_properties_with_description_only.py index d5166dfe134..698f5f8d899 100644 --- a/samples/openapi3/client/petstore/python/test/test_additional_properties_with_description_only.py +++ b/samples/openapi3/client/petstore/python/test/test_additional_properties_with_description_only.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.additional_properties_with_description_only import AdditionalPropertiesWithDescriptionOnly # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.additional_properties_with_description_only import AdditionalPropertiesWithDescriptionOnly class TestAdditionalPropertiesWithDescriptionOnly(unittest.TestCase): """AdditionalPropertiesWithDescriptionOnly unit test stubs""" @@ -28,19 +25,19 @@ class TestAdditionalPropertiesWithDescriptionOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AdditionalPropertiesWithDescriptionOnly: """Test AdditionalPropertiesWithDescriptionOnly - include_option is a boolean, when False only required + 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 `AdditionalPropertiesWithDescriptionOnly` """ - model = petstore_api.models.additional_properties_with_description_only.AdditionalPropertiesWithDescriptionOnly() # noqa: E501 - if include_optional : + model = AdditionalPropertiesWithDescriptionOnly() + if include_optional: return AdditionalPropertiesWithDescriptionOnly( name = '' ) - else : + else: return AdditionalPropertiesWithDescriptionOnly( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_all_of_super_model.py b/samples/openapi3/client/petstore/python/test/test_all_of_super_model.py index dfc6d444ba7..0b37180a54c 100644 --- a/samples/openapi3/client/petstore/python/test/test_all_of_super_model.py +++ b/samples/openapi3/client/petstore/python/test/test_all_of_super_model.py @@ -27,7 +27,7 @@ class TestAllOfSuperModel(unittest.TestCase): def make_instance(self, include_optional) -> AllOfSuperModel: """Test AllOfSuperModel - include_option is a boolean, when False only required + 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 `AllOfSuperModel` diff --git a/samples/openapi3/client/petstore/python/test/test_all_of_with_single_ref.py b/samples/openapi3/client/petstore/python/test/test_all_of_with_single_ref.py index ee761ef82d0..ff147a1bc4e 100644 --- a/samples/openapi3/client/petstore/python/test/test_all_of_with_single_ref.py +++ b/samples/openapi3/client/petstore/python/test/test_all_of_with_single_ref.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.all_of_with_single_ref import AllOfWithSingleRef # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.all_of_with_single_ref import AllOfWithSingleRef class TestAllOfWithSingleRef(unittest.TestCase): """AllOfWithSingleRef unit test stubs""" @@ -28,25 +25,28 @@ class TestAllOfWithSingleRef(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AllOfWithSingleRef: """Test AllOfWithSingleRef - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.all_of_with_single_ref.AllOfWithSingleRef() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AllOfWithSingleRef` + """ + model = AllOfWithSingleRef() + if include_optional: return AllOfWithSingleRef( - username = '', - single_ref_type = None + username = '', + single_ref_type = 'admin' ) - else : + else: return AllOfWithSingleRef( ) + """ def testAllOfWithSingleRef(self): """Test AllOfWithSingleRef""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_animal.py b/samples/openapi3/client/petstore/python/test/test_animal.py index 75d9ddf5188..4ea318679b6 100644 --- a/samples/openapi3/client/petstore/python/test/test_animal.py +++ b/samples/openapi3/client/petstore/python/test/test_animal.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.animal import Animal # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.animal import Animal class TestAnimal(unittest.TestCase): """Animal unit test stubs""" @@ -28,26 +25,29 @@ class TestAnimal(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Animal: """Test Animal - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.animal.Animal() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Animal` + """ + model = Animal() + if include_optional: return Animal( - className = '', + class_name = '', color = 'red' ) - else : + else: return Animal( - className = '', + class_name = '', ) + """ def testAnimal(self): """Test Animal""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_another_fake_api.py b/samples/openapi3/client/petstore/python/test/test_another_fake_api.py index d95798cfc5a..d1b73d979ff 100644 --- a/samples/openapi3/client/petstore/python/test/test_another_fake_api.py +++ b/samples/openapi3/client/petstore/python/test/test_another_fake_api.py @@ -3,35 +3,33 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import petstore_api -from petstore_api.api.another_fake_api import AnotherFakeApi # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.api.another_fake_api import AnotherFakeApi class TestAnotherFakeApi(unittest.TestCase): """AnotherFakeApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.another_fake_api.AnotherFakeApi() # noqa: E501 + def setUp(self) -> None: + self.api = AnotherFakeApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_call_123_test_special_tags(self): + def test_call_123_test_special_tags(self) -> None: """Test case for call_123_test_special_tags - To test special tags # noqa: E501 + To test special tags """ pass diff --git a/samples/openapi3/client/petstore/python/test/test_any_of_color.py b/samples/openapi3/client/petstore/python/test/test_any_of_color.py index 2a97cfef752..f6092af623a 100644 --- a/samples/openapi3/client/petstore/python/test/test_any_of_color.py +++ b/samples/openapi3/client/petstore/python/test/test_any_of_color.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.any_of_color import AnyOfColor # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.any_of_color import AnyOfColor class TestAnyOfColor(unittest.TestCase): """AnyOfColor unit test stubs""" @@ -28,18 +25,18 @@ class TestAnyOfColor(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AnyOfColor: """Test AnyOfColor - include_option is a boolean, when False only required + 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 `AnyOfColor` """ - model = petstore_api.models.any_of_color.AnyOfColor() # noqa: E501 - if include_optional : + model = AnyOfColor() + if include_optional: return AnyOfColor( ) - else : + else: return AnyOfColor( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_any_of_pig.py b/samples/openapi3/client/petstore/python/test/test_any_of_pig.py index f041e5f9d6f..e69d8f25900 100644 --- a/samples/openapi3/client/petstore/python/test/test_any_of_pig.py +++ b/samples/openapi3/client/petstore/python/test/test_any_of_pig.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.any_of_pig import AnyOfPig # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.any_of_pig import AnyOfPig class TestAnyOfPig(unittest.TestCase): """AnyOfPig unit test stubs""" @@ -28,6 +25,28 @@ class TestAnyOfPig(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> AnyOfPig: + """Test AnyOfPig + 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 `AnyOfPig` + """ + model = AnyOfPig() + if include_optional: + return AnyOfPig( + class_name = '', + color = '', + size = 56 + ) + else: + return AnyOfPig( + class_name = '', + color = '', + size = 56, + ) + """ + def testAnyOfPig(self): """Test AnyOfPig""" # inst_req_only = self.make_instance(include_optional=False) diff --git a/samples/openapi3/client/petstore/python/test/test_array_of_array_of_model.py b/samples/openapi3/client/petstore/python/test/test_array_of_array_of_model.py index 1072a19255d..a96ea540171 100644 --- a/samples/openapi3/client/petstore/python/test/test_array_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python/test/test_array_of_array_of_model.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.array_of_array_of_model import ArrayOfArrayOfModel # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.array_of_array_of_model import ArrayOfArrayOfModel class TestArrayOfArrayOfModel(unittest.TestCase): """ArrayOfArrayOfModel unit test stubs""" @@ -28,17 +25,17 @@ class TestArrayOfArrayOfModel(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ArrayOfArrayOfModel: """Test ArrayOfArrayOfModel - include_option is a boolean, when False only required + 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 `ArrayOfArrayOfModel` """ - model = petstore_api.models.array_of_array_of_model.ArrayOfArrayOfModel() # noqa: E501 - if include_optional : + model = ArrayOfArrayOfModel() + if include_optional: return ArrayOfArrayOfModel( - shop_id_to_org_online_lip_map = [ + another_property = [ [ petstore_api.models.tag.Tag( id = 56, @@ -46,7 +43,7 @@ class TestArrayOfArrayOfModel(unittest.TestCase): ] ] ) - else : + else: return ArrayOfArrayOfModel( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/test/test_array_of_array_of_number_only.py index 001b4e56573..bd89ba2188d 100644 --- a/samples/openapi3/client/petstore/python/test/test_array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/test/test_array_of_array_of_number_only.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly class TestArrayOfArrayOfNumberOnly(unittest.TestCase): """ArrayOfArrayOfNumberOnly unit test stubs""" @@ -28,13 +25,15 @@ class TestArrayOfArrayOfNumberOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ArrayOfArrayOfNumberOnly: """Test ArrayOfArrayOfNumberOnly - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.array_of_array_of_number_only.ArrayOfArrayOfNumberOnly() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ArrayOfArrayOfNumberOnly` + """ + model = ArrayOfArrayOfNumberOnly() + if include_optional: return ArrayOfArrayOfNumberOnly( array_array_number = [ [ @@ -42,14 +41,15 @@ class TestArrayOfArrayOfNumberOnly(unittest.TestCase): ] ] ) - else : + else: return ArrayOfArrayOfNumberOnly( ) + """ def testArrayOfArrayOfNumberOnly(self): """Test ArrayOfArrayOfNumberOnly""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_array_of_number_only.py b/samples/openapi3/client/petstore/python/test/test_array_of_number_only.py index a35703ae0da..f67af039fce 100644 --- a/samples/openapi3/client/petstore/python/test/test_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/test/test_array_of_number_only.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.array_of_number_only import ArrayOfNumberOnly # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.array_of_number_only import ArrayOfNumberOnly class TestArrayOfNumberOnly(unittest.TestCase): """ArrayOfNumberOnly unit test stubs""" @@ -28,26 +25,29 @@ class TestArrayOfNumberOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ArrayOfNumberOnly: """Test ArrayOfNumberOnly - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.array_of_number_only.ArrayOfNumberOnly() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ArrayOfNumberOnly` + """ + model = ArrayOfNumberOnly() + if include_optional: return ArrayOfNumberOnly( array_number = [ 1.337 ] ) - else : + else: return ArrayOfNumberOnly( ) + """ def testArrayOfNumberOnly(self): """Test ArrayOfNumberOnly""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_array_test.py b/samples/openapi3/client/petstore/python/test/test_array_test.py index 8327e415adc..21ce90c4c2c 100644 --- a/samples/openapi3/client/petstore/python/test/test_array_test.py +++ b/samples/openapi3/client/petstore/python/test/test_array_test.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.array_test import ArrayTest # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.array_test import ArrayTest class TestArrayTest(unittest.TestCase): """ArrayTest unit test stubs""" @@ -28,22 +25,27 @@ class TestArrayTest(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ArrayTest: """Test ArrayTest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.array_test.ArrayTest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ArrayTest` + """ + model = ArrayTest() + if include_optional: return ArrayTest( array_of_string = [ '' - ], + ], + array_of_nullable_float = [ + 1.337 + ], array_array_of_integer = [ [ 56 ] - ], + ], array_array_of_model = [ [ petstore_api.models.read_only_first.ReadOnlyFirst( @@ -52,14 +54,15 @@ class TestArrayTest(unittest.TestCase): ] ] ) - else : + else: return ArrayTest( ) + """ def testArrayTest(self): """Test ArrayTest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_base_discriminator.py b/samples/openapi3/client/petstore/python/test/test_base_discriminator.py index 61c40f7f680..05ed4b3d4da 100644 --- a/samples/openapi3/client/petstore/python/test/test_base_discriminator.py +++ b/samples/openapi3/client/petstore/python/test/test_base_discriminator.py @@ -27,7 +27,7 @@ class TestBaseDiscriminator(unittest.TestCase): def make_instance(self, include_optional) -> BaseDiscriminator: """Test BaseDiscriminator - include_option is a boolean, when False only required + 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 `BaseDiscriminator` diff --git a/samples/openapi3/client/petstore/python/test/test_basque_pig.py b/samples/openapi3/client/petstore/python/test/test_basque_pig.py index 26e2a845a95..f79d16cd858 100644 --- a/samples/openapi3/client/petstore/python/test/test_basque_pig.py +++ b/samples/openapi3/client/petstore/python/test/test_basque_pig.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.basque_pig import BasquePig # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.basque_pig import BasquePig class TestBasquePig(unittest.TestCase): """BasquePig unit test stubs""" @@ -28,27 +25,30 @@ class TestBasquePig(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> BasquePig: """Test BasquePig - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.basque_pig.BasquePig() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `BasquePig` + """ + model = BasquePig() + if include_optional: return BasquePig( - class_name = '', + class_name = '', color = '' ) - else : + else: return BasquePig( class_name = '', color = '', ) + """ def testBasquePig(self): """Test BasquePig""" - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_bathing.py b/samples/openapi3/client/petstore/python/test/test_bathing.py index 583bdcbb09e..f2b6a75a95a 100644 --- a/samples/openapi3/client/petstore/python/test/test_bathing.py +++ b/samples/openapi3/client/petstore/python/test/test_bathing.py @@ -13,7 +13,6 @@ import unittest -import datetime from petstore_api.models.bathing import Bathing @@ -28,7 +27,7 @@ class TestBathing(unittest.TestCase): def make_instance(self, include_optional) -> Bathing: """Test Bathing - include_option is a boolean, when False only required + 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 `Bathing` diff --git a/samples/openapi3/client/petstore/python/test/test_capitalization.py b/samples/openapi3/client/petstore/python/test/test_capitalization.py index c7a9721dbc0..6e8f95b7acf 100644 --- a/samples/openapi3/client/petstore/python/test/test_capitalization.py +++ b/samples/openapi3/client/petstore/python/test/test_capitalization.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.capitalization import Capitalization # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.capitalization import Capitalization class TestCapitalization(unittest.TestCase): """Capitalization unit test stubs""" @@ -28,29 +25,32 @@ class TestCapitalization(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Capitalization: """Test Capitalization - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.capitalization.Capitalization() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Capitalization` + """ + model = Capitalization() + if include_optional: return Capitalization( - small_camel = '', - capital_camel = '', - small_snake = '', - capital_snake = '', - sca_eth_flow_points = '', + small_camel = '', + capital_camel = '', + small_snake = '', + capital_snake = '', + sca_eth_flow_points = '', att_name = '' ) - else : + else: return Capitalization( ) + """ def testCapitalization(self): """Test Capitalization""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_cat.py b/samples/openapi3/client/petstore/python/test/test_cat.py index e04566b1aaf..15034d82ed3 100644 --- a/samples/openapi3/client/petstore/python/test/test_cat.py +++ b/samples/openapi3/client/petstore/python/test/test_cat.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.cat import Cat # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.cat import Cat class TestCat(unittest.TestCase): """Cat unit test stubs""" @@ -28,6 +25,23 @@ class TestCat(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Cat: + """Test Cat + 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 `Cat` + """ + model = Cat() + if include_optional: + return Cat( + declawed = True + ) + else: + return Cat( + ) + """ + def testCat(self): """Test Cat""" # inst_req_only = self.make_instance(include_optional=False) diff --git a/samples/openapi3/client/petstore/python/test/test_category.py b/samples/openapi3/client/petstore/python/test/test_category.py index 14848fcebcd..014917bf17f 100644 --- a/samples/openapi3/client/petstore/python/test/test_category.py +++ b/samples/openapi3/client/petstore/python/test/test_category.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.category import Category # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.category import Category class TestCategory(unittest.TestCase): """Category unit test stubs""" @@ -28,21 +25,24 @@ class TestCategory(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Category: """Test Category - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.category.Category() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Category` + """ + model = Category() + if include_optional: return Category( - id = 56, + id = 56, name = 'default-name' ) - else : + else: return Category( name = 'default-name', ) + """ def testCategory(self): """Test Category""" diff --git a/samples/openapi3/client/petstore/python/test/test_circular_all_of_ref.py b/samples/openapi3/client/petstore/python/test/test_circular_all_of_ref.py index 767c758a733..9d81ff91b15 100644 --- a/samples/openapi3/client/petstore/python/test/test_circular_all_of_ref.py +++ b/samples/openapi3/client/petstore/python/test/test_circular_all_of_ref.py @@ -27,7 +27,7 @@ class TestCircularAllOfRef(unittest.TestCase): def make_instance(self, include_optional) -> CircularAllOfRef: """Test CircularAllOfRef - include_option is a boolean, when False only required + 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 `CircularAllOfRef` @@ -35,16 +35,10 @@ class TestCircularAllOfRef(unittest.TestCase): model = CircularAllOfRef() if include_optional: return CircularAllOfRef( + name = '', second_circular_all_of_ref = [ - petstore_api.models.second_circular_all_of_ref.SecondCircularAllOfRef( - circular_all_of_ref = [ - petstore_api.models.circular_all_of_ref.CircularAllOfRef( - second_circular_all_of_ref = [ - petstore_api.models.second_circular_all_of_ref.SecondCircularAllOfRef() - ], ) - ], ) - ], - name = '' + petstore_api.models.second_circular_all_of_ref.SecondCircularAllOfRef() + ] ) else: return CircularAllOfRef( diff --git a/samples/openapi3/client/petstore/python/test/test_circular_reference_model.py b/samples/openapi3/client/petstore/python/test/test_circular_reference_model.py index f734d3fc0ff..18148b2b7d1 100644 --- a/samples/openapi3/client/petstore/python/test/test_circular_reference_model.py +++ b/samples/openapi3/client/petstore/python/test/test_circular_reference_model.py @@ -3,23 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 -from __future__ import absolute_import - import unittest -import datetime -import petstore_api -from petstore_api.models.circular_reference_model import CircularReferenceModel # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.circular_reference_model import CircularReferenceModel class TestCircularReferenceModel(unittest.TestCase): """CircularReferenceModel unit test stubs""" @@ -30,17 +25,17 @@ class TestCircularReferenceModel(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CircularReferenceModel: """Test CircularReferenceModel - include_option is a boolean, when False only required + 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 `CircularReferenceModel` """ - model = petstore_api.models.circular_reference_model.CircularReferenceModel() # noqa: E501 - if include_optional : + model = CircularReferenceModel() + if include_optional: return CircularReferenceModel( - size = 56, + size = 56, nested = petstore_api.models.first_ref.FirstRef( category = '', self_ref = petstore_api.models.second_ref.SecondRef( @@ -50,7 +45,7 @@ class TestCircularReferenceModel(unittest.TestCase): nested = petstore_api.models.first_ref.FirstRef( category = '', ), ), ), ) ) - else : + else: return CircularReferenceModel( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_class_model.py b/samples/openapi3/client/petstore/python/test/test_class_model.py index 511843f2dcf..1826cbf5398 100644 --- a/samples/openapi3/client/petstore/python/test/test_class_model.py +++ b/samples/openapi3/client/petstore/python/test/test_class_model.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.class_model import ClassModel # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.class_model import ClassModel class TestClassModel(unittest.TestCase): """ClassModel unit test stubs""" @@ -28,24 +25,27 @@ class TestClassModel(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ClassModel: """Test ClassModel - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.class_model.ClassModel() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ClassModel` + """ + model = ClassModel() + if include_optional: return ClassModel( - _class = '' + var_class = '' ) - else : + else: return ClassModel( ) + """ def testClassModel(self): """Test ClassModel""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_client.py b/samples/openapi3/client/petstore/python/test/test_client.py index 9209bb2c3f0..1586543c171 100644 --- a/samples/openapi3/client/petstore/python/test/test_client.py +++ b/samples/openapi3/client/petstore/python/test/test_client.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.client import Client # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.client import Client class TestClient(unittest.TestCase): """Client unit test stubs""" @@ -28,24 +25,27 @@ class TestClient(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Client: """Test Client - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.client.Client() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Client` + """ + model = Client() + if include_optional: return Client( client = '' ) - else : + else: return Client( ) + """ def testClient(self): """Test Client""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_color.py b/samples/openapi3/client/petstore/python/test/test_color.py index 9a7aabfea25..2ebb0ec04de 100644 --- a/samples/openapi3/client/petstore/python/test/test_color.py +++ b/samples/openapi3/client/petstore/python/test/test_color.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.color import Color # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.color import Color class TestColor(unittest.TestCase): """Color unit test stubs""" @@ -28,18 +25,18 @@ class TestColor(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Color: """Test Color - include_option is a boolean, when False only required + 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 `Color` """ - model = petstore_api.models.color.Color() # noqa: E501 - if include_optional : + model = Color() + if include_optional: return Color( ) - else : + else: return Color( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_creature.py b/samples/openapi3/client/petstore/python/test/test_creature.py index 66b3e088cbb..eab8f68f3a5 100644 --- a/samples/openapi3/client/petstore/python/test/test_creature.py +++ b/samples/openapi3/client/petstore/python/test/test_creature.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.creature import Creature # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.creature import Creature class TestCreature(unittest.TestCase): """Creature unit test stubs""" @@ -28,21 +25,21 @@ class TestCreature(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Creature: """Test Creature - include_option is a boolean, when False only required + 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 `Creature` """ - model = petstore_api.models.creature.Creature() # noqa: E501 - if include_optional : + model = Creature() + if include_optional: return Creature( info = petstore_api.models.creature_info.CreatureInfo( - name = '', ), + name = '', ), type = '' ) - else : + else: return Creature( info = petstore_api.models.creature_info.CreatureInfo( name = '', ), diff --git a/samples/openapi3/client/petstore/python/test/test_creature_info.py b/samples/openapi3/client/petstore/python/test/test_creature_info.py index 0a85d5ffe7b..d645563a479 100644 --- a/samples/openapi3/client/petstore/python/test/test_creature_info.py +++ b/samples/openapi3/client/petstore/python/test/test_creature_info.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.creature_info import CreatureInfo # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.creature_info import CreatureInfo class TestCreatureInfo(unittest.TestCase): """CreatureInfo unit test stubs""" @@ -28,19 +25,19 @@ class TestCreatureInfo(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CreatureInfo: """Test CreatureInfo - include_option is a boolean, when False only required + 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 `CreatureInfo` """ - model = petstore_api.models.creature_info.CreatureInfo() # noqa: E501 - if include_optional : + model = CreatureInfo() + if include_optional: return CreatureInfo( name = '' ) - else : + else: return CreatureInfo( name = '', ) diff --git a/samples/openapi3/client/petstore/python/test/test_danish_pig.py b/samples/openapi3/client/petstore/python/test/test_danish_pig.py index 0d850ae94f4..1dc992542c4 100644 --- a/samples/openapi3/client/petstore/python/test/test_danish_pig.py +++ b/samples/openapi3/client/petstore/python/test/test_danish_pig.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.danish_pig import DanishPig # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.danish_pig import DanishPig class TestDanishPig(unittest.TestCase): """DanishPig unit test stubs""" @@ -28,27 +25,30 @@ class TestDanishPig(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DanishPig: """Test DanishPig - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.danish_pig.DanishPig() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `DanishPig` + """ + model = DanishPig() + if include_optional: return DanishPig( - class_name = '', + class_name = '', size = 56 ) - else : + else: return DanishPig( class_name = '', size = 56, ) + """ def testDanishPig(self): """Test DanishPig""" - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_default_api.py b/samples/openapi3/client/petstore/python/test/test_default_api.py index 50e7c57bd0b..eb421a8edc1 100644 --- a/samples/openapi3/client/petstore/python/test/test_default_api.py +++ b/samples/openapi3/client/petstore/python/test/test_default_api.py @@ -3,32 +3,30 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import petstore_api -from petstore_api.api.default_api import DefaultApi # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.api.default_api import DefaultApi class TestDefaultApi(unittest.TestCase): """DefaultApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.default_api.DefaultApi() # noqa: E501 + def setUp(self) -> None: + self.api = DefaultApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_foo_get(self): + def test_foo_get(self) -> None: """Test case for foo_get """ diff --git a/samples/openapi3/client/petstore/python/test/test_deprecated_object.py b/samples/openapi3/client/petstore/python/test/test_deprecated_object.py index 50257271cd7..e63842997ae 100644 --- a/samples/openapi3/client/petstore/python/test/test_deprecated_object.py +++ b/samples/openapi3/client/petstore/python/test/test_deprecated_object.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.deprecated_object import DeprecatedObject # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.deprecated_object import DeprecatedObject class TestDeprecatedObject(unittest.TestCase): """DeprecatedObject unit test stubs""" @@ -28,24 +25,27 @@ class TestDeprecatedObject(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DeprecatedObject: """Test DeprecatedObject - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.deprecated_object.DeprecatedObject() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `DeprecatedObject` + """ + model = DeprecatedObject() + if include_optional: return DeprecatedObject( name = '' ) - else : + else: return DeprecatedObject( ) + """ def testDeprecatedObject(self): """Test DeprecatedObject""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_discriminator_all_of_sub.py b/samples/openapi3/client/petstore/python/test/test_discriminator_all_of_sub.py index 15941f4f854..f52f3d33f13 100644 --- a/samples/openapi3/client/petstore/python/test/test_discriminator_all_of_sub.py +++ b/samples/openapi3/client/petstore/python/test/test_discriminator_all_of_sub.py @@ -27,7 +27,7 @@ class TestDiscriminatorAllOfSub(unittest.TestCase): def make_instance(self, include_optional) -> DiscriminatorAllOfSub: """Test DiscriminatorAllOfSub - include_option is a boolean, when False only required + 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 `DiscriminatorAllOfSub` diff --git a/samples/openapi3/client/petstore/python/test/test_discriminator_all_of_super.py b/samples/openapi3/client/petstore/python/test/test_discriminator_all_of_super.py index 503d6b3c558..830fa0a829a 100644 --- a/samples/openapi3/client/petstore/python/test/test_discriminator_all_of_super.py +++ b/samples/openapi3/client/petstore/python/test/test_discriminator_all_of_super.py @@ -27,7 +27,7 @@ class TestDiscriminatorAllOfSuper(unittest.TestCase): def make_instance(self, include_optional) -> DiscriminatorAllOfSuper: """Test DiscriminatorAllOfSuper - include_option is a boolean, when False only required + 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 `DiscriminatorAllOfSuper` diff --git a/samples/openapi3/client/petstore/python/test/test_dog.py b/samples/openapi3/client/petstore/python/test/test_dog.py index af75161287e..c11f61c99c0 100644 --- a/samples/openapi3/client/petstore/python/test/test_dog.py +++ b/samples/openapi3/client/petstore/python/test/test_dog.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.dog import Dog # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.dog import Dog class TestDog(unittest.TestCase): """Dog unit test stubs""" @@ -28,6 +25,23 @@ class TestDog(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Dog: + """Test Dog + 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 `Dog` + """ + model = Dog() + if include_optional: + return Dog( + breed = '' + ) + else: + return Dog( + ) + """ + def testDog(self): """Test Dog""" # inst_req_only = self.make_instance(include_optional=False) diff --git a/samples/openapi3/client/petstore/python/test/test_dummy_model.py b/samples/openapi3/client/petstore/python/test/test_dummy_model.py index d6562c58bc2..8b276ec140b 100644 --- a/samples/openapi3/client/petstore/python/test/test_dummy_model.py +++ b/samples/openapi3/client/petstore/python/test/test_dummy_model.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.dummy_model import DummyModel # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.dummy_model import DummyModel class TestDummyModel(unittest.TestCase): """DummyModel unit test stubs""" @@ -28,23 +25,23 @@ class TestDummyModel(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DummyModel: """Test DummyModel - include_option is a boolean, when False only required + 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 `DummyModel` """ - model = petstore_api.models.dummy_model.DummyModel() # noqa: E501 - if include_optional : + model = DummyModel() + if include_optional: return DummyModel( - category = '', + category = '', self_ref = petstore_api.models.self_reference_model.Self-Reference-Model( size = 56, nested = petstore_api.models.dummy_model.Dummy-Model( category = '', ), ) ) - else : + else: return DummyModel( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_enum_arrays.py b/samples/openapi3/client/petstore/python/test/test_enum_arrays.py index 52cc98601bc..f3d731b3f59 100644 --- a/samples/openapi3/client/petstore/python/test/test_enum_arrays.py +++ b/samples/openapi3/client/petstore/python/test/test_enum_arrays.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.enum_arrays import EnumArrays # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.enum_arrays import EnumArrays class TestEnumArrays(unittest.TestCase): """EnumArrays unit test stubs""" @@ -28,22 +25,25 @@ class TestEnumArrays(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> EnumArrays: """Test EnumArrays - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.enum_arrays.EnumArrays() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `EnumArrays` + """ + model = EnumArrays() + if include_optional: return EnumArrays( - just_symbol = '>=', + just_symbol = '>=', array_enum = [ 'fish' ] ) - else : + else: return EnumArrays( ) + """ def testEnumArrays(self): """Test EnumArrays""" diff --git a/samples/openapi3/client/petstore/python/test/test_enum_class.py b/samples/openapi3/client/petstore/python/test/test_enum_class.py index 9d7a81272cd..5730ded0ad3 100644 --- a/samples/openapi3/client/petstore/python/test/test_enum_class.py +++ b/samples/openapi3/client/petstore/python/test/test_enum_class.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.enum_class import EnumClass # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.enum_class import EnumClass class TestEnumClass(unittest.TestCase): """EnumClass unit test stubs""" diff --git a/samples/openapi3/client/petstore/python/test/test_enum_serialization.py b/samples/openapi3/client/petstore/python/test/test_enum_serialization.py deleted file mode 100644 index aca0106b36b..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_enum_serialization.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from petstore_api.models.enum_serialization import EnumSerialization - -class TestEnumSerialization(unittest.TestCase): - """EnumSerialization unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnumSerialization(self): - """Test EnumSerialization""" - # inst = EnumSerialization() - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_enum_string1.py b/samples/openapi3/client/petstore/python/test/test_enum_string1.py index 9dbe9eb44fb..e6a85884120 100644 --- a/samples/openapi3/client/petstore/python/test/test_enum_string1.py +++ b/samples/openapi3/client/petstore/python/test/test_enum_string1.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.enum_string1 import EnumString1 # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.enum_string1 import EnumString1 class TestEnumString1(unittest.TestCase): """EnumString1 unit test stubs""" diff --git a/samples/openapi3/client/petstore/python/test/test_enum_string2.py b/samples/openapi3/client/petstore/python/test/test_enum_string2.py index 4ec0ffcd86c..6a52c081d3c 100644 --- a/samples/openapi3/client/petstore/python/test/test_enum_string2.py +++ b/samples/openapi3/client/petstore/python/test/test_enum_string2.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.enum_string2 import EnumString2 # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.enum_string2 import EnumString2 class TestEnumString2(unittest.TestCase): """EnumString2 unit test stubs""" diff --git a/samples/openapi3/client/petstore/python/test/test_enum_test.py b/samples/openapi3/client/petstore/python/test/test_enum_test.py index afb342ae934..5f2f59e6c62 100644 --- a/samples/openapi3/client/petstore/python/test/test_enum_test.py +++ b/samples/openapi3/client/petstore/python/test/test_enum_test.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.enum_test import EnumTest # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.enum_test import EnumTest class TestEnumTest(unittest.TestCase): """EnumTest unit test stubs""" @@ -28,27 +25,35 @@ class TestEnumTest(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> EnumTest: """Test EnumTest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.enum_test.EnumTest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `EnumTest` + """ + model = EnumTest() + if include_optional: return EnumTest( - enum_string = 'UPPER', - enum_string_required = 'UPPER', - enum_integer = 1, - enum_number = 1.1, - outer_enum = 'placed', - outer_enum_integer = 2, - outer_enum_default_value = 'placed', - outer_enum_integer_default_value = 0 + enum_string = 'UPPER', + enum_string_required = 'UPPER', + enum_integer_default = 1, + enum_integer = 1, + enum_number = 1.1, + enum_number_vendor_ext = 42, + enum_string_vendor_ext = 'FOO', + enum_string_single_member = 'abc', + enum_integer_single_member = 100, + outer_enum = 'placed', + outer_enum_integer = 2, + outer_enum_default_value = 'placed', + outer_enum_integer_default_value = -1 ) - else : + else: return EnumTest( enum_string_required = 'UPPER', ) + """ def testEnumTest(self): """Test EnumTest""" diff --git a/samples/openapi3/client/petstore/python/test/test_fake_api.py b/samples/openapi3/client/petstore/python/test/test_fake_api.py index 9a7dfbb9643..11920b00480 100644 --- a/samples/openapi3/client/petstore/python/test/test_fake_api.py +++ b/samples/openapi3/client/petstore/python/test/test_fake_api.py @@ -3,145 +3,277 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -try: - from unittest.mock import patch -except ImportError: - from mock import patch -import petstore_api -from petstore_api.api.fake_api import FakeApi # noqa: E501 +from petstore_api.api.fake_api import FakeApi class TestFakeApi(unittest.TestCase): """FakeApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.fake_api.FakeApi() # noqa: E501 + def setUp(self) -> None: + self.api = FakeApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_fake_health_get(self): + def test_fake_any_type_request_body(self) -> None: + """Test case for fake_any_type_request_body + + test any type request body + """ + pass + + def test_fake_enum_ref_query_parameter(self) -> None: + """Test case for fake_enum_ref_query_parameter + + test enum reference query parameter + """ + pass + + def test_fake_health_get(self) -> None: """Test case for fake_health_get - Health check endpoint # noqa: E501 + Health check endpoint """ pass - def test_fake_http_signature_test(self): + def test_fake_http_signature_test(self) -> None: """Test case for fake_http_signature_test - test http signature authentication # noqa: E501 + test http signature authentication """ pass - def test_fake_outer_boolean_serialize(self): + def test_fake_outer_boolean_serialize(self) -> None: """Test case for fake_outer_boolean_serialize """ pass - def test_fake_outer_composite_serialize(self): + def test_fake_outer_composite_serialize(self) -> None: """Test case for fake_outer_composite_serialize """ pass - def test_fake_outer_number_serialize(self): + def test_fake_outer_number_serialize(self) -> None: """Test case for fake_outer_number_serialize """ pass - def test_fake_outer_string_serialize(self): + def test_fake_outer_string_serialize(self) -> None: """Test case for fake_outer_string_serialize """ pass - def test_test_body_with_file_schema(self): + def test_fake_property_enum_integer_serialize(self) -> None: + """Test case for fake_property_enum_integer_serialize + + """ + pass + + def test_fake_ref_enum_string(self) -> None: + """Test case for fake_ref_enum_string + + test ref to enum string + """ + pass + + def test_fake_return_boolean(self) -> None: + """Test case for fake_return_boolean + + test returning boolean + """ + pass + + def test_fake_return_byte_like_json(self) -> None: + """Test case for fake_return_byte_like_json + + test byte like json + """ + pass + + def test_fake_return_enum(self) -> None: + """Test case for fake_return_enum + + test returning enum + """ + pass + + def test_fake_return_enum_like_json(self) -> None: + """Test case for fake_return_enum_like_json + + test enum like json + """ + pass + + def test_fake_return_float(self) -> None: + """Test case for fake_return_float + + test returning float + """ + pass + + def test_fake_return_int(self) -> None: + """Test case for fake_return_int + + test returning int + """ + pass + + def test_fake_return_list_of_objects(self) -> None: + """Test case for fake_return_list_of_objects + + test returning list of objects + """ + pass + + def test_fake_return_str_like_json(self) -> None: + """Test case for fake_return_str_like_json + + test str like json + """ + pass + + def test_fake_return_string(self) -> None: + """Test case for fake_return_string + + test returning string + """ + pass + + def test_fake_uuid_example(self) -> None: + """Test case for fake_uuid_example + + test uuid example + """ + pass + + def test_test_additional_properties_reference(self) -> None: + """Test case for test_additional_properties_reference + + test referenced additionalProperties + """ + pass + + def test_test_body_with_binary(self) -> None: + """Test case for test_body_with_binary + + """ + pass + + def test_test_body_with_file_schema(self) -> None: """Test case for test_body_with_file_schema """ pass - def test_test_body_with_query_params(self): + def test_test_body_with_query_params(self) -> None: """Test case for test_body_with_query_params """ pass - def test_test_client_model(self): + def test_test_client_model(self) -> None: """Test case for test_client_model - To test \"client\" model # noqa: E501 + To test \"client\" model """ pass - def test_test_endpoint_parameters(self): + def test_test_date_time_query_parameter(self) -> None: + """Test case for test_date_time_query_parameter + + """ + pass + + def test_test_empty_and_non_empty_responses(self) -> None: + """Test case for test_empty_and_non_empty_responses + + test empty and non-empty responses + """ + pass + + def test_test_endpoint_parameters(self) -> None: """Test case for test_endpoint_parameters - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 """ pass - def test_test_enum_parameters(self): - """Test case for test_enum_parameters + def test_test_error_responses_with_model(self) -> None: + """Test case for test_error_responses_with_model - To test enum parameters # noqa: E501 + test error responses with model """ pass - def test_test_group_parameters(self): + def test_test_group_parameters(self) -> None: """Test case for test_group_parameters - Fake endpoint to test group parameters (optional) # noqa: E501 + Fake endpoint to test group parameters (optional) """ pass - def test_test_inline_additional_properties(self): + def test_test_inline_additional_properties(self) -> None: """Test case for test_inline_additional_properties - test inline additionalProperties # noqa: E501 + test inline additionalProperties """ pass - def test_test_json_form_data(self): + def test_test_inline_freeform_additional_properties(self) -> None: + """Test case for test_inline_freeform_additional_properties + + test inline free-form additionalProperties + """ + pass + + def test_test_json_form_data(self) -> None: """Test case for test_json_form_data - test json serialization of form data # noqa: E501 + test json serialization of form data """ pass - def test_test_query_parameter_collection_format(self): + def test_test_object_for_multipart_requests(self) -> None: + """Test case for test_object_for_multipart_requests + + """ + pass + + def test_test_query_parameter_collection_format(self) -> None: """Test case for test_query_parameter_collection_format """ pass - @unittest.skip("TODO: MagicMock error") - def test_headers_parameter(self): - """Test case for the _headers are passed by the user + def test_test_string_map_reference(self) -> None: + """Test case for test_string_map_reference - To test any optional parameter # noqa: E501 + test referenced string map """ - api = petstore_api.api.PetApi() - with patch("petstore_api.api_client.ApiClient.call_api") as mock_method: - value_headers = {"Header1": "value1"} - api.find_pets_by_status(["available"], _headers=value_headers) - args, _ = mock_method.call_args - self.assertEqual(args, ('GET', '/pet/findByStatus', {}, [('status', ['available'])], {'Accept': 'application/json', 'Header1': 'value1'}) -) + pass + + def test_upload_file_with_additional_properties(self) -> None: + """Test case for upload_file_with_additional_properties + + uploads a file and additional properties using multipart/form-data + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python/test/test_fake_classname_tags123_api.py index 881dcba0d25..9282bf7150c 100644 --- a/samples/openapi3/client/petstore/python/test/test_fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python/test/test_fake_classname_tags123_api.py @@ -2,33 +2,34 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import petstore_api -from petstore_api.api.fake_classname_tags123_api import FakeClassnameTags123Api # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.api.fake_classname_tags123_api import FakeClassnameTags123Api class TestFakeClassnameTags123Api(unittest.TestCase): """FakeClassnameTags123Api unit test stubs""" - def setUp(self): - self.api = petstore_api.api.fake_classname_tags123_api.FakeClassnameTags123Api() # noqa: E501 + def setUp(self) -> None: + self.api = FakeClassnameTags123Api() - def tearDown(self): + def tearDown(self) -> None: pass - def test_test_classname(self): + def test_test_classname(self) -> None: """Test case for test_classname - To test class name in snake case # noqa: E501 + + To test class name in snake case """ pass diff --git a/samples/openapi3/client/petstore/python/test/test_feeding.py b/samples/openapi3/client/petstore/python/test/test_feeding.py index a0cdfc8f346..fc9d904716e 100644 --- a/samples/openapi3/client/petstore/python/test/test_feeding.py +++ b/samples/openapi3/client/petstore/python/test/test_feeding.py @@ -13,7 +13,6 @@ import unittest -import datetime from petstore_api.models.feeding import Feeding @@ -28,7 +27,7 @@ class TestFeeding(unittest.TestCase): def make_instance(self, include_optional) -> Feeding: """Test Feeding - include_option is a boolean, when False only required + 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 `Feeding` diff --git a/samples/openapi3/client/petstore/python/test/test_file.py b/samples/openapi3/client/petstore/python/test/test_file.py index 3c9b91972d9..d050f598246 100644 --- a/samples/openapi3/client/petstore/python/test/test_file.py +++ b/samples/openapi3/client/petstore/python/test/test_file.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.file import File # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.file import File class TestFile(unittest.TestCase): """File unit test stubs""" @@ -28,24 +25,27 @@ class TestFile(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> File: """Test File - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.file.File() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `File` + """ + model = File() + if include_optional: return File( source_uri = '' ) - else : + else: return File( ) + """ def testFile(self): """Test File""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_file_schema_test_class.py b/samples/openapi3/client/petstore/python/test/test_file_schema_test_class.py index 2834ddc0541..ebbf1f58705 100644 --- a/samples/openapi3/client/petstore/python/test/test_file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/test/test_file_schema_test_class.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.file_schema_test_class import FileSchemaTestClass # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.file_schema_test_class import FileSchemaTestClass class TestFileSchemaTestClass(unittest.TestCase): """FileSchemaTestClass unit test stubs""" @@ -28,29 +25,32 @@ class TestFileSchemaTestClass(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> FileSchemaTestClass: """Test FileSchemaTestClass - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.file_schema_test_class.FileSchemaTestClass() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `FileSchemaTestClass` + """ + model = FileSchemaTestClass() + if include_optional: return FileSchemaTestClass( file = petstore_api.models.file.File( - source_uri = '', ), + source_uri = '', ), files = [ petstore_api.models.file.File( source_uri = '', ) ] ) - else : + else: return FileSchemaTestClass( ) + """ def testFileSchemaTestClass(self): """Test FileSchemaTestClass""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_first_ref.py b/samples/openapi3/client/petstore/python/test/test_first_ref.py index bcec1c0334b..38520ad2e63 100644 --- a/samples/openapi3/client/petstore/python/test/test_first_ref.py +++ b/samples/openapi3/client/petstore/python/test/test_first_ref.py @@ -3,23 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 -from __future__ import absolute_import - import unittest -import datetime -import petstore_api -from petstore_api.models.first_ref import FirstRef # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.first_ref import FirstRef class TestFirstRef(unittest.TestCase): """FirstRef unit test stubs""" @@ -30,17 +25,17 @@ class TestFirstRef(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> FirstRef: """Test FirstRef - include_option is a boolean, when False only required + 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 `FirstRef` """ - model = petstore_api.models.first_ref.FirstRef() # noqa: E501 - if include_optional : + model = FirstRef() + if include_optional: return FirstRef( - category = '', + category = '', self_ref = petstore_api.models.second_ref.SecondRef( category = '', circular_ref = petstore_api.models.circular_reference_model.Circular-Reference-Model( @@ -48,7 +43,7 @@ class TestFirstRef(unittest.TestCase): nested = petstore_api.models.first_ref.FirstRef( category = '', ), ), ) ) - else : + else: return FirstRef( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_foo.py b/samples/openapi3/client/petstore/python/test/test_foo.py index f592b1c3701..430ee19bf69 100644 --- a/samples/openapi3/client/petstore/python/test/test_foo.py +++ b/samples/openapi3/client/petstore/python/test/test_foo.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.foo import Foo # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.foo import Foo class TestFoo(unittest.TestCase): """Foo unit test stubs""" @@ -28,24 +25,27 @@ class TestFoo(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Foo: """Test Foo - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.foo.Foo() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Foo` + """ + model = Foo() + if include_optional: return Foo( bar = 'bar' ) - else : + else: return Foo( ) + """ def testFoo(self): """Test Foo""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_foo_get_default_response.py b/samples/openapi3/client/petstore/python/test/test_foo_get_default_response.py index d2cadc258d8..c5524b88d2b 100644 --- a/samples/openapi3/client/petstore/python/test/test_foo_get_default_response.py +++ b/samples/openapi3/client/petstore/python/test/test_foo_get_default_response.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.foo_get_default_response import FooGetDefaultResponse # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.foo_get_default_response import FooGetDefaultResponse class TestFooGetDefaultResponse(unittest.TestCase): """FooGetDefaultResponse unit test stubs""" @@ -28,25 +25,28 @@ class TestFooGetDefaultResponse(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> FooGetDefaultResponse: """Test FooGetDefaultResponse - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.foo_get_default_response.FooGetDefaultResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `FooGetDefaultResponse` + """ + model = FooGetDefaultResponse() + if include_optional: return FooGetDefaultResponse( string = petstore_api.models.foo.Foo( bar = 'bar', ) ) - else : + else: return FooGetDefaultResponse( ) + """ def testFooGetDefaultResponse(self): """Test FooGetDefaultResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_format_test.py b/samples/openapi3/client/petstore/python/test/test_format_test.py index e236e5b7e67..8cde3f67815 100644 --- a/samples/openapi3/client/petstore/python/test/test_format_test.py +++ b/samples/openapi3/client/petstore/python/test/test_format_test.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.format_test import FormatTest # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.format_test import FormatTest class TestFormatTest(unittest.TestCase): """FormatTest unit test stubs""" @@ -28,44 +25,46 @@ class TestFormatTest(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> FormatTest: """Test FormatTest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.format_test.FormatTest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `FormatTest` + """ + model = FormatTest() + if include_optional: return FormatTest( - integer = 10, - int32 = 20, - int64 = 56, - number = 132.1, - float = 54.3, - double = 67.8, - decimal = 1, - string = 'a', - byte = bytes("someting", 'utf-8'), - binary = bytes(b'blah'), + integer = 10, + int32 = 20, + int64 = 56, + number = 32.1, + var_float = 54.3, + double = 67.8, + decimal = 1, + string = 'a', + string_with_double_quote_pattern = 'this is \"something\"', + byte = 'YQ==', + binary = bytes(b'blah'), var_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), - date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - uuid = '72f98069-206d-4f12-9f12-3d1e525a8e84', - password = '0123456789', - pattern_with_digits = '0480728880', + date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + uuid = '72f98069-206d-4f12-9f12-3d1e525a8e84', + password = '0123456789', + pattern_with_digits = '0480728880', pattern_with_digits_and_delimiter = 'image_480' ) - else : + else: return FormatTest( - number = 122.1, - byte = bytes("someting", 'utf-8'), - date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + number = 32.1, + var_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), password = '0123456789', ) + """ def testFormatTest(self): """Test FormatTest""" - inst_req_only = self.make_instance(include_optional=False) - # TODO - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_has_only_read_only.py b/samples/openapi3/client/petstore/python/test/test_has_only_read_only.py index 2a8d2df6a0f..59013015dc7 100644 --- a/samples/openapi3/client/petstore/python/test/test_has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/test/test_has_only_read_only.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.has_only_read_only import HasOnlyReadOnly # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.has_only_read_only import HasOnlyReadOnly class TestHasOnlyReadOnly(unittest.TestCase): """HasOnlyReadOnly unit test stubs""" @@ -28,25 +25,28 @@ class TestHasOnlyReadOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> HasOnlyReadOnly: """Test HasOnlyReadOnly - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.has_only_read_only.HasOnlyReadOnly() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `HasOnlyReadOnly` + """ + model = HasOnlyReadOnly() + if include_optional: return HasOnlyReadOnly( - bar = '', + bar = '', foo = '' ) - else : + else: return HasOnlyReadOnly( ) + """ def testHasOnlyReadOnly(self): """Test HasOnlyReadOnly""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_health_check_result.py b/samples/openapi3/client/petstore/python/test/test_health_check_result.py index 21c52053ea2..a50444e6d87 100644 --- a/samples/openapi3/client/petstore/python/test/test_health_check_result.py +++ b/samples/openapi3/client/petstore/python/test/test_health_check_result.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.health_check_result import HealthCheckResult # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.health_check_result import HealthCheckResult class TestHealthCheckResult(unittest.TestCase): """HealthCheckResult unit test stubs""" @@ -28,24 +25,27 @@ class TestHealthCheckResult(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> HealthCheckResult: """Test HealthCheckResult - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.health_check_result.HealthCheckResult() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `HealthCheckResult` + """ + model = HealthCheckResult() + if include_optional: return HealthCheckResult( nullable_message = '' ) - else : + else: return HealthCheckResult( ) + """ def testHealthCheckResult(self): """Test HealthCheckResult""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_info.py b/samples/openapi3/client/petstore/python/test/test_info.py index e1fce9f9c1e..47075061d9a 100644 --- a/samples/openapi3/client/petstore/python/test/test_info.py +++ b/samples/openapi3/client/petstore/python/test/test_info.py @@ -27,7 +27,7 @@ class TestInfo(unittest.TestCase): def make_instance(self, include_optional) -> Info: """Test Info - include_option is a boolean, when False only required + 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 `Info` diff --git a/samples/openapi3/client/petstore/python/test/test_inner_dict_with_property.py b/samples/openapi3/client/petstore/python/test/test_inner_dict_with_property.py index 8a63b70d552..1f80e90e29d 100644 --- a/samples/openapi3/client/petstore/python/test/test_inner_dict_with_property.py +++ b/samples/openapi3/client/petstore/python/test/test_inner_dict_with_property.py @@ -3,23 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 -from __future__ import absolute_import - import unittest -import datetime -import petstore_api -from petstore_api.models.inner_dict_with_property import InnerDictWithProperty # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.inner_dict_with_property import InnerDictWithProperty class TestInnerDictWithProperty(unittest.TestCase): """InnerDictWithProperty unit test stubs""" @@ -30,19 +25,19 @@ class TestInnerDictWithProperty(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InnerDictWithProperty: """Test InnerDictWithProperty - include_option is a boolean, when False only required + 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 `InnerDictWithProperty` """ - model = petstore_api.models.inner_dict_with_property.InnerDictWithProperty() # noqa: E501 - if include_optional : + model = InnerDictWithProperty() + if include_optional: return InnerDictWithProperty( a_property = None ) - else : + else: return InnerDictWithProperty( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_input_all_of.py b/samples/openapi3/client/petstore/python/test/test_input_all_of.py index 7ca8140d4d4..212f59bea79 100644 --- a/samples/openapi3/client/petstore/python/test/test_input_all_of.py +++ b/samples/openapi3/client/petstore/python/test/test_input_all_of.py @@ -27,7 +27,7 @@ class TestInputAllOf(unittest.TestCase): def make_instance(self, include_optional) -> InputAllOf: """Test InputAllOf - include_option is a boolean, when False only required + 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 `InputAllOf` diff --git a/samples/openapi3/client/petstore/python/test/test_int_or_string.py b/samples/openapi3/client/petstore/python/test/test_int_or_string.py index 0de76602cb6..a649aac2469 100644 --- a/samples/openapi3/client/petstore/python/test/test_int_or_string.py +++ b/samples/openapi3/client/petstore/python/test/test_int_or_string.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.int_or_string import IntOrString # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.int_or_string import IntOrString class TestIntOrString(unittest.TestCase): """IntOrString unit test stubs""" @@ -28,18 +25,18 @@ class TestIntOrString(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> IntOrString: """Test IntOrString - include_option is a boolean, when False only required + 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 `IntOrString` """ - model = petstore_api.models.int_or_string.IntOrString() # noqa: E501 - if include_optional : + model = IntOrString() + if include_optional: return IntOrString( ) - else : + else: return IntOrString( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_list_class.py b/samples/openapi3/client/petstore/python/test/test_list_class.py index ac14bf3b398..7da7d021f77 100644 --- a/samples/openapi3/client/petstore/python/test/test_list_class.py +++ b/samples/openapi3/client/petstore/python/test/test_list_class.py @@ -13,9 +13,8 @@ import unittest -import datetime -from petstore_api.models.list_class import ListClass # noqa: E501 +from petstore_api.models.list_class import ListClass class TestListClass(unittest.TestCase): """ListClass unit test stubs""" @@ -28,12 +27,12 @@ class TestListClass(unittest.TestCase): def make_instance(self, include_optional) -> ListClass: """Test ListClass - include_option is a boolean, when False only required + 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 `ListClass` """ - model = ListClass() # noqa: E501 + model = ListClass() if include_optional: return ListClass( var_123_list = '' diff --git a/samples/openapi3/client/petstore/python/test/test_map_of_array_of_model.py b/samples/openapi3/client/petstore/python/test/test_map_of_array_of_model.py index 31ad486f5c0..2d5637f8f34 100644 --- a/samples/openapi3/client/petstore/python/test/test_map_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python/test/test_map_of_array_of_model.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.map_of_array_of_model import MapOfArrayOfModel # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.map_of_array_of_model import MapOfArrayOfModel class TestMapOfArrayOfModel(unittest.TestCase): """MapOfArrayOfModel unit test stubs""" @@ -28,15 +25,15 @@ class TestMapOfArrayOfModel(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> MapOfArrayOfModel: """Test MapOfArrayOfModel - include_option is a boolean, when False only required + 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 `MapOfArrayOfModel` """ - model = petstore_api.models.map_of_array_of_model.MapOfArrayOfModel() # noqa: E501 - if include_optional : + model = MapOfArrayOfModel() + if include_optional: return MapOfArrayOfModel( shop_id_to_org_online_lip_map = { 'key' : [ @@ -46,7 +43,7 @@ class TestMapOfArrayOfModel(unittest.TestCase): ] } ) - else : + else: return MapOfArrayOfModel( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_map_test.py b/samples/openapi3/client/petstore/python/test/test_map_test.py index 5e11fed312a..6d15e3d0b34 100644 --- a/samples/openapi3/client/petstore/python/test/test_map_test.py +++ b/samples/openapi3/client/petstore/python/test/test_map_test.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.map_test import MapTest # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.map_test import MapTest class TestMapTest(unittest.TestCase): """MapTest unit test stubs""" @@ -28,38 +25,40 @@ class TestMapTest(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> MapTest: """Test MapTest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.map_test.MapTest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `MapTest` + """ + model = MapTest() + if include_optional: return MapTest( map_map_of_string = { 'key' : { 'key' : '' } - }, + }, map_of_enum_string = { 'UPPER' : 'UPPER' - }, + }, direct_map = { 'key' : True - }, + }, indirect_map = { 'key' : True } ) - else : + else: return MapTest( ) + """ def testMapTest(self): """Test MapTest""" - # TODO - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py index 5e6437ad058..33d884c768b 100644 --- a/samples/openapi3/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/test/test_mixed_properties_and_additional_properties_class.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass class TestMixedPropertiesAndAdditionalPropertiesClass(unittest.TestCase): """MixedPropertiesAndAdditionalPropertiesClass unit test stubs""" @@ -28,30 +25,33 @@ class TestMixedPropertiesAndAdditionalPropertiesClass(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> MixedPropertiesAndAdditionalPropertiesClass: """Test MixedPropertiesAndAdditionalPropertiesClass - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.mixed_properties_and_additional_properties_class.MixedPropertiesAndAdditionalPropertiesClass() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `MixedPropertiesAndAdditionalPropertiesClass` + """ + model = MixedPropertiesAndAdditionalPropertiesClass() + if include_optional: return MixedPropertiesAndAdditionalPropertiesClass( - uuid = '', - date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + uuid = '', + date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), map = { 'key' : petstore_api.models.animal.Animal( - className = '', + class_name = '', color = 'red', ) } ) - else : + else: return MixedPropertiesAndAdditionalPropertiesClass( ) + """ def testMixedPropertiesAndAdditionalPropertiesClass(self): """Test MixedPropertiesAndAdditionalPropertiesClass""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_model200_response.py b/samples/openapi3/client/petstore/python/test/test_model200_response.py index f7e9677e007..007f8a62395 100644 --- a/samples/openapi3/client/petstore/python/test/test_model200_response.py +++ b/samples/openapi3/client/petstore/python/test/test_model200_response.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.model200_response import Model200Response # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.model200_response import Model200Response class TestModel200Response(unittest.TestCase): """Model200Response unit test stubs""" @@ -28,25 +25,28 @@ class TestModel200Response(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Model200Response: """Test Model200Response - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.model200_response.Model200Response() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Model200Response` + """ + model = Model200Response() + if include_optional: return Model200Response( - name = 56, - _class = '' + name = 56, + var_class = '' ) - else : + else: return Model200Response( ) + """ def testModel200Response(self): """Test Model200Response""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_model_api_response.py b/samples/openapi3/client/petstore/python/test/test_model_api_response.py index f37f3408440..beca8e34434 100644 --- a/samples/openapi3/client/petstore/python/test/test_model_api_response.py +++ b/samples/openapi3/client/petstore/python/test/test_model_api_response.py @@ -13,7 +13,6 @@ import unittest -import datetime from petstore_api.models.model_api_response import ModelApiResponse @@ -28,7 +27,7 @@ class TestModelApiResponse(unittest.TestCase): def make_instance(self, include_optional) -> ModelApiResponse: """Test ModelApiResponse - include_option is a boolean, when False only required + 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 `ModelApiResponse` diff --git a/samples/openapi3/client/petstore/python/test/test_model_field.py b/samples/openapi3/client/petstore/python/test/test_model_field.py index 315823b8062..eb8dee7981c 100644 --- a/samples/openapi3/client/petstore/python/test/test_model_field.py +++ b/samples/openapi3/client/petstore/python/test/test_model_field.py @@ -27,7 +27,7 @@ class TestModelField(unittest.TestCase): def make_instance(self, include_optional) -> ModelField: """Test ModelField - include_option is a boolean, when False only required + 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 `ModelField` @@ -35,7 +35,7 @@ class TestModelField(unittest.TestCase): model = ModelField() if include_optional: return ModelField( - dummy = '' + var_field = '' ) else: return ModelField( diff --git a/samples/openapi3/client/petstore/python/test/test_model_return.py b/samples/openapi3/client/petstore/python/test/test_model_return.py index b0f9d9c4f7f..2c2afa1d43b 100644 --- a/samples/openapi3/client/petstore/python/test/test_model_return.py +++ b/samples/openapi3/client/petstore/python/test/test_model_return.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.model_return import ModelReturn # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.model_return import ModelReturn class TestModelReturn(unittest.TestCase): """ModelReturn unit test stubs""" @@ -28,24 +25,27 @@ class TestModelReturn(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ModelReturn: """Test ModelReturn - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.model_return.ModelReturn() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ModelReturn` + """ + model = ModelReturn() + if include_optional: return ModelReturn( - _return = 56 + var_return = 56 ) - else : + else: return ModelReturn( ) + """ def testModelReturn(self): """Test ModelReturn""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_name.py b/samples/openapi3/client/petstore/python/test/test_name.py index bbf11fd231e..db4e9cf37e9 100644 --- a/samples/openapi3/client/petstore/python/test/test_name.py +++ b/samples/openapi3/client/petstore/python/test/test_name.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.name import Name # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.name import Name class TestName(unittest.TestCase): """Name unit test stubs""" @@ -28,28 +25,31 @@ class TestName(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Name: """Test Name - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.name.Name() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Name` + """ + model = Name() + if include_optional: return Name( - name = 56, - snake_case = 56, - _property = '', - _123_number = 56 + name = 56, + snake_case = 56, + var_property = '', + var_123_number = 56 ) - else : + else: return Name( name = 56, ) + """ def testName(self): """Test Name""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_nullable_class.py b/samples/openapi3/client/petstore/python/test/test_nullable_class.py index 7aa59f46bbd..ecf5363b4ac 100644 --- a/samples/openapi3/client/petstore/python/test/test_nullable_class.py +++ b/samples/openapi3/client/petstore/python/test/test_nullable_class.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.nullable_class import NullableClass # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.nullable_class import NullableClass class TestNullableClass(unittest.TestCase): """NullableClass unit test stubs""" @@ -28,50 +25,52 @@ class TestNullableClass(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NullableClass: """Test NullableClass - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.nullable_class.NullableClass() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `NullableClass` + """ + model = NullableClass() + if include_optional: return NullableClass( required_integer_prop = 56, - integer_prop = 56, - number_prop = 1.337, - boolean_prop = True, - string_prop = '', - date_prop = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), - datetime_prop = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + integer_prop = 56, + number_prop = 1.337, + boolean_prop = True, + string_prop = '', + date_prop = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + datetime_prop = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), array_nullable_prop = [ None - ], + ], array_and_items_nullable_prop = [ None - ], + ], array_items_nullable = [ None - ], + ], object_nullable_prop = { 'key' : None - }, + }, object_and_items_nullable_prop = { 'key' : None - }, + }, object_items_nullable = { 'key' : None } ) - else : + else: return NullableClass( - required_integer_prop = 56 + required_integer_prop = 56, ) + """ def testNullableClass(self): """Test NullableClass""" - # TODO - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_nullable_property.py b/samples/openapi3/client/petstore/python/test/test_nullable_property.py index 34129457b1d..52bdc7874ed 100644 --- a/samples/openapi3/client/petstore/python/test/test_nullable_property.py +++ b/samples/openapi3/client/petstore/python/test/test_nullable_property.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.nullable_property import NullableProperty # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.nullable_property import NullableProperty class TestNullableProperty(unittest.TestCase): """NullableProperty unit test stubs""" @@ -28,20 +25,20 @@ class TestNullableProperty(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NullableProperty: """Test NullableProperty - include_option is a boolean, when False only required + 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 `NullableProperty` """ - model = petstore_api.models.nullable_property.NullableProperty() # noqa: E501 - if include_optional : + model = NullableProperty() + if include_optional: return NullableProperty( - id = 56, + id = 56, name = 'AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>' ) - else : + else: return NullableProperty( id = 56, name = 'AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>', diff --git a/samples/openapi3/client/petstore/python/test/test_number_only.py b/samples/openapi3/client/petstore/python/test/test_number_only.py index 776946c3d77..78d7c5cff92 100644 --- a/samples/openapi3/client/petstore/python/test/test_number_only.py +++ b/samples/openapi3/client/petstore/python/test/test_number_only.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.number_only import NumberOnly # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.number_only import NumberOnly class TestNumberOnly(unittest.TestCase): """NumberOnly unit test stubs""" @@ -28,24 +25,27 @@ class TestNumberOnly(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NumberOnly: """Test NumberOnly - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.number_only.NumberOnly() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `NumberOnly` + """ + model = NumberOnly() + if include_optional: return NumberOnly( just_number = 1.337 ) - else : + else: return NumberOnly( ) + """ def testNumberOnly(self): """Test NumberOnly""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_object_to_test_additional_properties.py b/samples/openapi3/client/petstore/python/test/test_object_to_test_additional_properties.py index f1f354cad25..62c9c505865 100644 --- a/samples/openapi3/client/petstore/python/test/test_object_to_test_additional_properties.py +++ b/samples/openapi3/client/petstore/python/test/test_object_to_test_additional_properties.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.object_to_test_additional_properties import ObjectToTestAdditionalProperties # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.object_to_test_additional_properties import ObjectToTestAdditionalProperties class TestObjectToTestAdditionalProperties(unittest.TestCase): """ObjectToTestAdditionalProperties unit test stubs""" @@ -28,19 +25,19 @@ class TestObjectToTestAdditionalProperties(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ObjectToTestAdditionalProperties: """Test ObjectToTestAdditionalProperties - include_option is a boolean, when False only required + 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 `ObjectToTestAdditionalProperties` """ - model = petstore_api.models.object_to_test_additional_properties.ObjectToTestAdditionalProperties() # noqa: E501 - if include_optional : + model = ObjectToTestAdditionalProperties() + if include_optional: return ObjectToTestAdditionalProperties( var_property = True ) - else : + else: return ObjectToTestAdditionalProperties( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_object_with_deprecated_fields.py b/samples/openapi3/client/petstore/python/test/test_object_with_deprecated_fields.py index e0cbf3e98a5..bf6bf779339 100644 --- a/samples/openapi3/client/petstore/python/test/test_object_with_deprecated_fields.py +++ b/samples/openapi3/client/petstore/python/test/test_object_with_deprecated_fields.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.object_with_deprecated_fields import ObjectWithDeprecatedFields # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.object_with_deprecated_fields import ObjectWithDeprecatedFields class TestObjectWithDeprecatedFields(unittest.TestCase): """ObjectWithDeprecatedFields unit test stubs""" @@ -28,30 +25,33 @@ class TestObjectWithDeprecatedFields(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ObjectWithDeprecatedFields: """Test ObjectWithDeprecatedFields - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.object_with_deprecated_fields.ObjectWithDeprecatedFields() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ObjectWithDeprecatedFields` + """ + model = ObjectWithDeprecatedFields() + if include_optional: return ObjectWithDeprecatedFields( - uuid = '', - id = 1.337, + uuid = '', + id = 1.337, deprecated_ref = petstore_api.models.deprecated_object.DeprecatedObject( - name = '', ), + name = '', ), bars = [ 'bar' ] ) - else : + else: return ObjectWithDeprecatedFields( ) + """ def testObjectWithDeprecatedFields(self): """Test ObjectWithDeprecatedFields""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_one_of_enum_string.py b/samples/openapi3/client/petstore/python/test/test_one_of_enum_string.py index ed959c1479c..0434db164a7 100644 --- a/samples/openapi3/client/petstore/python/test/test_one_of_enum_string.py +++ b/samples/openapi3/client/petstore/python/test/test_one_of_enum_string.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.one_of_enum_string import OneOfEnumString # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.one_of_enum_string import OneOfEnumString class TestOneOfEnumString(unittest.TestCase): """OneOfEnumString unit test stubs""" @@ -28,18 +25,18 @@ class TestOneOfEnumString(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> OneOfEnumString: """Test OneOfEnumString - include_option is a boolean, when False only required + 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 `OneOfEnumString` """ - model = petstore_api.models.one_of_enum_string.OneOfEnumString() # noqa: E501 - if include_optional : + model = OneOfEnumString() + if include_optional: return OneOfEnumString( ) - else : + else: return OneOfEnumString( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_order.py b/samples/openapi3/client/petstore/python/test/test_order.py index d6ec36f83a0..a9b4980702d 100644 --- a/samples/openapi3/client/petstore/python/test/test_order.py +++ b/samples/openapi3/client/petstore/python/test/test_order.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.order import Order # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.order import Order class TestOrder(unittest.TestCase): """Order unit test stubs""" @@ -28,29 +25,32 @@ class TestOrder(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Order: """Test Order - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.order.Order() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Order` + """ + model = Order() + if include_optional: return Order( - id = 56, - pet_id = 56, - quantity = 56, - ship_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - status = 'placed', + id = 56, + pet_id = 56, + quantity = 56, + ship_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = 'placed', complete = True ) - else : + else: return Order( ) + """ def testOrder(self): """Test Order""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_outer_composite.py b/samples/openapi3/client/petstore/python/test/test_outer_composite.py index c6fd5884937..5024f1c483a 100644 --- a/samples/openapi3/client/petstore/python/test/test_outer_composite.py +++ b/samples/openapi3/client/petstore/python/test/test_outer_composite.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.outer_composite import OuterComposite # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.outer_composite import OuterComposite class TestOuterComposite(unittest.TestCase): """OuterComposite unit test stubs""" @@ -28,26 +25,29 @@ class TestOuterComposite(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> OuterComposite: """Test OuterComposite - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.outer_composite.OuterComposite() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `OuterComposite` + """ + model = OuterComposite() + if include_optional: return OuterComposite( - my_number = 1.337, - my_string = '', + my_number = 1.337, + my_string = '', my_boolean = True ) - else : + else: return OuterComposite( ) + """ def testOuterComposite(self): """Test OuterComposite""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_outer_enum.py b/samples/openapi3/client/petstore/python/test/test_outer_enum.py index aa195260019..2f82ecc94ba 100644 --- a/samples/openapi3/client/petstore/python/test/test_outer_enum.py +++ b/samples/openapi3/client/petstore/python/test/test_outer_enum.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.outer_enum import OuterEnum # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.outer_enum import OuterEnum class TestOuterEnum(unittest.TestCase): """OuterEnum unit test stubs""" @@ -30,7 +27,7 @@ class TestOuterEnum(unittest.TestCase): def testOuterEnum(self): """Test OuterEnum""" - inst = OuterEnum("placed") + # inst = OuterEnum() if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_outer_enum_default_value.py b/samples/openapi3/client/petstore/python/test/test_outer_enum_default_value.py index f8fba3bd79a..2a7ff27a824 100644 --- a/samples/openapi3/client/petstore/python/test/test_outer_enum_default_value.py +++ b/samples/openapi3/client/petstore/python/test/test_outer_enum_default_value.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.outer_enum_default_value import OuterEnumDefaultValue # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.outer_enum_default_value import OuterEnumDefaultValue class TestOuterEnumDefaultValue(unittest.TestCase): """OuterEnumDefaultValue unit test stubs""" diff --git a/samples/openapi3/client/petstore/python/test/test_outer_enum_integer.py b/samples/openapi3/client/petstore/python/test/test_outer_enum_integer.py index ce1e47c61b1..d74dcb0981a 100644 --- a/samples/openapi3/client/petstore/python/test/test_outer_enum_integer.py +++ b/samples/openapi3/client/petstore/python/test/test_outer_enum_integer.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.outer_enum_integer import OuterEnumInteger # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.outer_enum_integer import OuterEnumInteger class TestOuterEnumInteger(unittest.TestCase): """OuterEnumInteger unit test stubs""" diff --git a/samples/openapi3/client/petstore/python/test/test_outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python/test/test_outer_enum_integer_default_value.py index f0b707fca77..230db8cb817 100644 --- a/samples/openapi3/client/petstore/python/test/test_outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python/test/test_outer_enum_integer_default_value.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.outer_enum_integer_default_value import OuterEnumIntegerDefaultValue # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.outer_enum_integer_default_value import OuterEnumIntegerDefaultValue class TestOuterEnumIntegerDefaultValue(unittest.TestCase): """OuterEnumIntegerDefaultValue unit test stubs""" @@ -28,23 +25,9 @@ class TestOuterEnumIntegerDefaultValue(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): - """Test OuterEnumIntegerDefaultValue - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = petstore_api.models.outer_enum_integer_default_value.OuterEnumIntegerDefaultValue() # noqa: E501 - if include_optional : - return OuterEnumIntegerDefaultValue( - ) - else : - return OuterEnumIntegerDefaultValue( - ) - def testOuterEnumIntegerDefaultValue(self): """Test OuterEnumIntegerDefaultValue""" - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst = OuterEnumIntegerDefaultValue() if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_outer_object_with_enum_property.py b/samples/openapi3/client/petstore/python/test/test_outer_object_with_enum_property.py index 35258d5d74a..a1c896ae661 100644 --- a/samples/openapi3/client/petstore/python/test/test_outer_object_with_enum_property.py +++ b/samples/openapi3/client/petstore/python/test/test_outer_object_with_enum_property.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.outer_object_with_enum_property import OuterObjectWithEnumProperty class TestOuterObjectWithEnumProperty(unittest.TestCase): """OuterObjectWithEnumProperty unit test stubs""" @@ -28,20 +25,24 @@ class TestOuterObjectWithEnumProperty(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> OuterObjectWithEnumProperty: """Test OuterObjectWithEnumProperty - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.outer_object_with_enum_property.OuterObjectWithEnumProperty() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `OuterObjectWithEnumProperty` + """ + model = OuterObjectWithEnumProperty() + if include_optional: return OuterObjectWithEnumProperty( + str_value = 'placed', value = 2 ) - else : + else: return OuterObjectWithEnumProperty( value = 2, ) + """ def testOuterObjectWithEnumProperty(self): """Test OuterObjectWithEnumProperty""" diff --git a/samples/openapi3/client/petstore/python/test/test_parent.py b/samples/openapi3/client/petstore/python/test/test_parent.py index 2a74505f08a..ea1242c24f4 100644 --- a/samples/openapi3/client/petstore/python/test/test_parent.py +++ b/samples/openapi3/client/petstore/python/test/test_parent.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.parent import Parent # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.parent import Parent class TestParent(unittest.TestCase): """Parent unit test stubs""" @@ -28,22 +25,22 @@ class TestParent(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Parent: """Test Parent - include_option is a boolean, when False only required + 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 `Parent` """ - model = petstore_api.models.parent.Parent() # noqa: E501 - if include_optional : + model = Parent() + if include_optional: return Parent( optional_dict = { 'key' : petstore_api.models.inner_dict_with_property.InnerDictWithProperty( a_property = petstore_api.models.a_property.aProperty(), ) } ) - else : + else: return Parent( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_parent_with_optional_dict.py b/samples/openapi3/client/petstore/python/test/test_parent_with_optional_dict.py index 25b769e3d39..7cc74f9e98e 100644 --- a/samples/openapi3/client/petstore/python/test/test_parent_with_optional_dict.py +++ b/samples/openapi3/client/petstore/python/test/test_parent_with_optional_dict.py @@ -3,23 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 -from __future__ import absolute_import - import unittest -import datetime -import petstore_api -from petstore_api.models.parent_with_optional_dict import ParentWithOptionalDict # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.parent_with_optional_dict import ParentWithOptionalDict class TestParentWithOptionalDict(unittest.TestCase): """ParentWithOptionalDict unit test stubs""" @@ -30,22 +25,22 @@ class TestParentWithOptionalDict(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ParentWithOptionalDict: """Test ParentWithOptionalDict - include_option is a boolean, when False only required + 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 `ParentWithOptionalDict` """ - model = petstore_api.models.parent_with_optional_dict.ParentWithOptionalDict() # noqa: E501 - if include_optional : + model = ParentWithOptionalDict() + if include_optional: return ParentWithOptionalDict( optional_dict = { 'key' : petstore_api.models.inner_dict_with_property.InnerDictWithProperty( a_property = petstore_api.models.a_property.aProperty(), ) } ) - else : + else: return ParentWithOptionalDict( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_pet.py b/samples/openapi3/client/petstore/python/test/test_pet.py index de97fcf848b..3edc400fafc 100644 --- a/samples/openapi3/client/petstore/python/test/test_pet.py +++ b/samples/openapi3/client/petstore/python/test/test_pet.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.pet import Pet # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.pet import Pet class TestPet(unittest.TestCase): """Pet unit test stubs""" @@ -28,41 +25,44 @@ class TestPet(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Pet: """Test Pet - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.pet.Pet() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Pet` + """ + model = Pet() + if include_optional: return Pet( - id = 56, + id = 56, category = petstore_api.models.category.Category( id = 56, - name = 'default-name', ), - name = 'doggie', - photoUrls = [ + name = 'default-name', ), + name = 'doggie', + photo_urls = [ '' - ], + ], tags = [ petstore_api.models.tag.Tag( id = 56, name = '', ) - ], + ], status = 'available' ) - else : + else: return Pet( name = 'doggie', - photoUrls = [ + 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) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_pet_api.py b/samples/openapi3/client/petstore/python/test/test_pet_api.py index 77665df879f..4cf869d36a2 100644 --- a/samples/openapi3/client/petstore/python/test/test_pet_api.py +++ b/samples/openapi3/client/petstore/python/test/test_pet_api.py @@ -3,91 +3,89 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import petstore_api -from petstore_api.api.pet_api import PetApi # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.api.pet_api import PetApi class TestPetApi(unittest.TestCase): """PetApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.pet_api.PetApi() # noqa: E501 + def setUp(self) -> None: + self.api = PetApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_add_pet(self): + def test_add_pet(self) -> None: """Test case for add_pet - Add a new pet to the store # noqa: E501 + Add a new pet to the store """ pass - def test_delete_pet(self): + def test_delete_pet(self) -> None: """Test case for delete_pet - Deletes a pet # noqa: E501 + Deletes a pet """ pass - def test_find_pets_by_status(self): + def test_find_pets_by_status(self) -> None: """Test case for find_pets_by_status - Finds Pets by status # noqa: E501 + Finds Pets by status """ pass - def test_find_pets_by_tags(self): + def test_find_pets_by_tags(self) -> None: """Test case for find_pets_by_tags - Finds Pets by tags # noqa: E501 + Finds Pets by tags """ pass - def test_get_pet_by_id(self): + def test_get_pet_by_id(self) -> None: """Test case for get_pet_by_id - Find pet by ID # noqa: E501 + Find pet by ID """ pass - def test_update_pet(self): + def test_update_pet(self) -> None: """Test case for update_pet - Update an existing pet # noqa: E501 + Update an existing pet """ pass - def test_update_pet_with_form(self): + def test_update_pet_with_form(self) -> None: """Test case for update_pet_with_form - Updates a pet in the store with form data # noqa: E501 + Updates a pet in the store with form data """ pass - def test_upload_file(self): + def test_upload_file(self) -> None: """Test case for upload_file - uploads an image # noqa: E501 + uploads an image """ pass - def test_upload_file_with_required_file(self): + def test_upload_file_with_required_file(self) -> None: """Test case for upload_file_with_required_file - uploads an image (required) # noqa: E501 + uploads an image (required) """ pass diff --git a/samples/openapi3/client/petstore/python/test/test_pig.py b/samples/openapi3/client/petstore/python/test/test_pig.py index 95e99f35a73..c336579232b 100644 --- a/samples/openapi3/client/petstore/python/test/test_pig.py +++ b/samples/openapi3/client/petstore/python/test/test_pig.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.pig import Pig # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.pig import Pig class TestPig(unittest.TestCase): """Pig unit test stubs""" @@ -28,6 +25,28 @@ class TestPig(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Pig: + """Test Pig + 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 `Pig` + """ + model = Pig() + if include_optional: + return Pig( + class_name = '', + color = '', + size = 56 + ) + else: + return Pig( + class_name = '', + color = '', + size = 56, + ) + """ + def testPig(self): """Test Pig""" # inst_req_only = self.make_instance(include_optional=False) diff --git a/samples/openapi3/client/petstore/python/test/test_poop_cleaning.py b/samples/openapi3/client/petstore/python/test/test_poop_cleaning.py index 4c94fddca97..5a12f965aef 100644 --- a/samples/openapi3/client/petstore/python/test/test_poop_cleaning.py +++ b/samples/openapi3/client/petstore/python/test/test_poop_cleaning.py @@ -13,7 +13,6 @@ import unittest -import datetime from petstore_api.models.poop_cleaning import PoopCleaning @@ -28,7 +27,7 @@ class TestPoopCleaning(unittest.TestCase): def make_instance(self, include_optional) -> PoopCleaning: """Test PoopCleaning - include_option is a boolean, when False only required + 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 `PoopCleaning` diff --git a/samples/openapi3/client/petstore/python/test/test_primitive_string.py b/samples/openapi3/client/petstore/python/test/test_primitive_string.py index 8b9ccf59893..67ec90914d0 100644 --- a/samples/openapi3/client/petstore/python/test/test_primitive_string.py +++ b/samples/openapi3/client/petstore/python/test/test_primitive_string.py @@ -27,7 +27,7 @@ class TestPrimitiveString(unittest.TestCase): def make_instance(self, include_optional) -> PrimitiveString: """Test PrimitiveString - include_option is a boolean, when False only required + 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 `PrimitiveString` diff --git a/samples/openapi3/client/petstore/python/test/test_property_map.py b/samples/openapi3/client/petstore/python/test/test_property_map.py index 3934a29432e..2f2fed72a13 100644 --- a/samples/openapi3/client/petstore/python/test/test_property_map.py +++ b/samples/openapi3/client/petstore/python/test/test_property_map.py @@ -27,7 +27,7 @@ class TestPropertyMap(unittest.TestCase): def make_instance(self, include_optional) -> PropertyMap: """Test PropertyMap - include_option is a boolean, when False only required + 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 `PropertyMap` diff --git a/samples/openapi3/client/petstore/python/test/test_property_name_collision.py b/samples/openapi3/client/petstore/python/test/test_property_name_collision.py index 04ab956f191..ab7919c7e6a 100644 --- a/samples/openapi3/client/petstore/python/test/test_property_name_collision.py +++ b/samples/openapi3/client/petstore/python/test/test_property_name_collision.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.property_name_collision import PropertyNameCollision # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.property_name_collision import PropertyNameCollision class TestPropertyNameCollision(unittest.TestCase): """PropertyNameCollision unit test stubs""" @@ -28,21 +25,21 @@ class TestPropertyNameCollision(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PropertyNameCollision: """Test PropertyNameCollision - include_option is a boolean, when False only required + 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 `PropertyNameCollision` """ - model = petstore_api.models.property_name_collision.PropertyNameCollision() # noqa: E501 - if include_optional : + model = PropertyNameCollision() + if include_optional: return PropertyNameCollision( - underscoreType = '', - type = '', - typeWithUnderscore = '' + underscore_type = '', + type = '', + type_with_underscore = '' ) - else : + else: return PropertyNameCollision( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_read_only_first.py b/samples/openapi3/client/petstore/python/test/test_read_only_first.py index 310e4b1aebb..ec7a1aa2414 100644 --- a/samples/openapi3/client/petstore/python/test/test_read_only_first.py +++ b/samples/openapi3/client/petstore/python/test/test_read_only_first.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.read_only_first import ReadOnlyFirst # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.read_only_first import ReadOnlyFirst class TestReadOnlyFirst(unittest.TestCase): """ReadOnlyFirst unit test stubs""" @@ -28,25 +25,28 @@ class TestReadOnlyFirst(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ReadOnlyFirst: """Test ReadOnlyFirst - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.read_only_first.ReadOnlyFirst() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ReadOnlyFirst` + """ + model = ReadOnlyFirst() + if include_optional: return ReadOnlyFirst( - bar = '', + bar = '', baz = '' ) - else : + else: return ReadOnlyFirst( ) + """ def testReadOnlyFirst(self): """Test ReadOnlyFirst""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_second_circular_all_of_ref.py b/samples/openapi3/client/petstore/python/test/test_second_circular_all_of_ref.py index 5e6d12f756b..21d9005a5e8 100644 --- a/samples/openapi3/client/petstore/python/test/test_second_circular_all_of_ref.py +++ b/samples/openapi3/client/petstore/python/test/test_second_circular_all_of_ref.py @@ -27,7 +27,7 @@ class TestSecondCircularAllOfRef(unittest.TestCase): def make_instance(self, include_optional) -> SecondCircularAllOfRef: """Test SecondCircularAllOfRef - include_option is a boolean, when False only required + 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 `SecondCircularAllOfRef` @@ -35,13 +35,10 @@ class TestSecondCircularAllOfRef(unittest.TestCase): model = SecondCircularAllOfRef() if include_optional: return SecondCircularAllOfRef( + name = '', circular_all_of_ref = [ - petstore_api.models.circular_all_of_ref.CircularAllOfRef( - second_circular_all_of_ref = [ - petstore_api.models.second_circular_all_of_ref.SecondCircularAllOfRef() - ], ) - ], - name = '' + petstore_api.models.circular_all_of_ref.CircularAllOfRef() + ] ) else: return SecondCircularAllOfRef( diff --git a/samples/openapi3/client/petstore/python/test/test_second_ref.py b/samples/openapi3/client/petstore/python/test/test_second_ref.py index 782892fd4e1..f6117988c19 100644 --- a/samples/openapi3/client/petstore/python/test/test_second_ref.py +++ b/samples/openapi3/client/petstore/python/test/test_second_ref.py @@ -3,23 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 -from __future__ import absolute_import - import unittest -import datetime -import petstore_api -from petstore_api.models.second_ref import SecondRef # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.second_ref import SecondRef class TestSecondRef(unittest.TestCase): """SecondRef unit test stubs""" @@ -30,17 +25,17 @@ class TestSecondRef(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SecondRef: """Test SecondRef - include_option is a boolean, when False only required + 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 `SecondRef` """ - model = petstore_api.models.second_ref.SecondRef() # noqa: E501 - if include_optional : + model = SecondRef() + if include_optional: return SecondRef( - category = '', + category = '', circular_ref = petstore_api.models.circular_reference_model.Circular-Reference-Model( size = 56, nested = petstore_api.models.first_ref.FirstRef( @@ -48,7 +43,7 @@ class TestSecondRef(unittest.TestCase): self_ref = petstore_api.models.second_ref.SecondRef( category = '', ), ), ) ) - else : + else: return SecondRef( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_self_reference_model.py b/samples/openapi3/client/petstore/python/test/test_self_reference_model.py index b3dd7ada2b2..018bcd195b6 100644 --- a/samples/openapi3/client/petstore/python/test/test_self_reference_model.py +++ b/samples/openapi3/client/petstore/python/test/test_self_reference_model.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.self_reference_model import SelfReferenceModel # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.self_reference_model import SelfReferenceModel class TestSelfReferenceModel(unittest.TestCase): """SelfReferenceModel unit test stubs""" @@ -28,17 +25,17 @@ class TestSelfReferenceModel(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SelfReferenceModel: """Test SelfReferenceModel - include_option is a boolean, when False only required + 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 `SelfReferenceModel` """ - model = petstore_api.models.self_reference_model.SelfReferenceModel() # noqa: E501 - if include_optional : + model = SelfReferenceModel() + if include_optional: return SelfReferenceModel( - size = 56, + size = 56, nested = petstore_api.models.dummy_model.Dummy-Model( category = '', self_ref = petstore_api.models.self_reference_model.Self-Reference-Model( @@ -46,7 +43,7 @@ class TestSelfReferenceModel(unittest.TestCase): nested = petstore_api.models.dummy_model.Dummy-Model( category = '', ), ), ) ) - else : + else: return SelfReferenceModel( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_single_ref_type.py b/samples/openapi3/client/petstore/python/test/test_single_ref_type.py index 888a1a7b6da..630b1c13708 100644 --- a/samples/openapi3/client/petstore/python/test/test_single_ref_type.py +++ b/samples/openapi3/client/petstore/python/test/test_single_ref_type.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.single_ref_type import SingleRefType # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.single_ref_type import SingleRefType class TestSingleRefType(unittest.TestCase): """SingleRefType unit test stubs""" @@ -28,23 +25,9 @@ class TestSingleRefType(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): - """Test SingleRefType - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = petstore_api.models.single_ref_type.SingleRefType() # noqa: E501 - if include_optional : - return SingleRefType( - ) - else : - return SingleRefType( - ) - def testSingleRefType(self): """Test SingleRefType""" - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst = SingleRefType() if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_special_character_enum.py b/samples/openapi3/client/petstore/python/test/test_special_character_enum.py index 028f55599e4..464808e61b0 100644 --- a/samples/openapi3/client/petstore/python/test/test_special_character_enum.py +++ b/samples/openapi3/client/petstore/python/test/test_special_character_enum.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.special_character_enum import SpecialCharacterEnum # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.special_character_enum import SpecialCharacterEnum class TestSpecialCharacterEnum(unittest.TestCase): """SpecialCharacterEnum unit test stubs""" diff --git a/samples/openapi3/client/petstore/python/test/test_special_model_name.py b/samples/openapi3/client/petstore/python/test/test_special_model_name.py index eb487cd42fc..e913fa28f51 100644 --- a/samples/openapi3/client/petstore/python/test/test_special_model_name.py +++ b/samples/openapi3/client/petstore/python/test/test_special_model_name.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.special_model_name import SpecialModelName # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.special_model_name import SpecialModelName class TestSpecialModelName(unittest.TestCase): """SpecialModelName unit test stubs""" @@ -28,24 +25,27 @@ class TestSpecialModelName(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SpecialModelName: """Test SpecialModelName - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.special_model_name.SpecialModelName() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SpecialModelName` + """ + model = SpecialModelName() + if include_optional: return SpecialModelName( special_property_name = 56 ) - else : + else: return SpecialModelName( ) + """ def testSpecialModelName(self): """Test SpecialModelName""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_special_name.py b/samples/openapi3/client/petstore/python/test/test_special_name.py index 1f4287871a8..153768c9898 100644 --- a/samples/openapi3/client/petstore/python/test/test_special_name.py +++ b/samples/openapi3/client/petstore/python/test/test_special_name.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.special_name import SpecialName # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.special_name import SpecialName class TestSpecialName(unittest.TestCase): """SpecialName unit test stubs""" @@ -28,23 +25,23 @@ class TestSpecialName(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SpecialName: """Test SpecialName - include_option is a boolean, when False only required + 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 `SpecialName` """ - model = petstore_api.models.special_name.SpecialName() # noqa: E501 - if include_optional : + model = SpecialName() + if include_optional: return SpecialName( - var_property = 56, + var_property = 56, var_async = petstore_api.models.category.Category( id = 56, - name = 'default-name', ), - status = 'available' + name = 'default-name', ), + var_schema = 'available' ) - else : + else: return SpecialName( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_store_api.py b/samples/openapi3/client/petstore/python/test/test_store_api.py index 81848d24a67..603b0f7bc57 100644 --- a/samples/openapi3/client/petstore/python/test/test_store_api.py +++ b/samples/openapi3/client/petstore/python/test/test_store_api.py @@ -3,56 +3,54 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import petstore_api -from petstore_api.api.store_api import StoreApi # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.api.store_api import StoreApi class TestStoreApi(unittest.TestCase): """StoreApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.store_api.StoreApi() # noqa: E501 + def setUp(self) -> None: + self.api = StoreApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_delete_order(self): + def test_delete_order(self) -> None: """Test case for delete_order - Delete purchase order by ID # noqa: E501 + Delete purchase order by ID """ pass - def test_get_inventory(self): + def test_get_inventory(self) -> None: """Test case for get_inventory - Returns pet inventories by status # noqa: E501 + Returns pet inventories by status """ pass - def test_get_order_by_id(self): + def test_get_order_by_id(self) -> None: """Test case for get_order_by_id - Find purchase order by ID # noqa: E501 + Find purchase order by ID """ pass - def test_place_order(self): + def test_place_order(self) -> None: """Test case for place_order - Place an order for a pet # noqa: E501 + Place an order for a pet """ pass diff --git a/samples/openapi3/client/petstore/python/test/test_tag.py b/samples/openapi3/client/petstore/python/test/test_tag.py index 9680300032f..92061e615e2 100644 --- a/samples/openapi3/client/petstore/python/test/test_tag.py +++ b/samples/openapi3/client/petstore/python/test/test_tag.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.tag import Tag # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.tag import Tag class TestTag(unittest.TestCase): """Tag unit test stubs""" @@ -28,25 +25,28 @@ class TestTag(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Tag: """Test Tag - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.tag.Tag() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Tag` + """ + model = Tag() + if include_optional: return Tag( - id = 56, + id = 56, name = '' ) - else : + else: return Tag( ) + """ def testTag(self): """Test Tag""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_task.py b/samples/openapi3/client/petstore/python/test/test_task.py index bbbc14a3992..0044da80776 100644 --- a/samples/openapi3/client/petstore/python/test/test_task.py +++ b/samples/openapi3/client/petstore/python/test/test_task.py @@ -13,7 +13,6 @@ import unittest -import datetime from petstore_api.models.task import Task @@ -28,7 +27,7 @@ class TestTask(unittest.TestCase): def make_instance(self, include_optional) -> Task: """Test Task - include_option is a boolean, when False only required + 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 `Task` diff --git a/samples/openapi3/client/petstore/python/test/test_task_activity.py b/samples/openapi3/client/petstore/python/test/test_task_activity.py index 2d56d9c5ad3..bd25e5887ac 100644 --- a/samples/openapi3/client/petstore/python/test/test_task_activity.py +++ b/samples/openapi3/client/petstore/python/test/test_task_activity.py @@ -13,7 +13,6 @@ import unittest -import datetime from petstore_api.models.task_activity import TaskActivity @@ -28,7 +27,7 @@ class TestTaskActivity(unittest.TestCase): def make_instance(self, include_optional) -> TaskActivity: """Test TaskActivity - include_option is a boolean, when False only required + 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 `TaskActivity` diff --git a/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model400_response.py b/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model400_response.py index 35db7ba74fb..72d243b82fc 100644 --- a/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model400_response.py +++ b/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model400_response.py @@ -13,7 +13,6 @@ import unittest -import datetime from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response @@ -28,7 +27,7 @@ class TestTestErrorResponsesWithModel400Response(unittest.TestCase): def make_instance(self, include_optional) -> TestErrorResponsesWithModel400Response: """Test TestErrorResponsesWithModel400Response - include_option is a boolean, when False only required + 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 `TestErrorResponsesWithModel400Response` diff --git a/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model404_response.py b/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model404_response.py index e9c97c0f484..fff790172b1 100644 --- a/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model404_response.py +++ b/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model404_response.py @@ -13,7 +13,6 @@ import unittest -import datetime from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response @@ -28,7 +27,7 @@ class TestTestErrorResponsesWithModel404Response(unittest.TestCase): def make_instance(self, include_optional) -> TestErrorResponsesWithModel404Response: """Test TestErrorResponsesWithModel404Response - include_option is a boolean, when False only required + 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 `TestErrorResponsesWithModel404Response` diff --git a/samples/openapi3/client/petstore/python/test/test_test_inline_freeform_additional_properties_request.py b/samples/openapi3/client/petstore/python/test/test_test_inline_freeform_additional_properties_request.py index 5c40397bc91..add42258580 100644 --- a/samples/openapi3/client/petstore/python/test/test_test_inline_freeform_additional_properties_request.py +++ b/samples/openapi3/client/petstore/python/test/test_test_inline_freeform_additional_properties_request.py @@ -13,9 +13,8 @@ import unittest -import datetime -from petstore_api.models.test_inline_freeform_additional_properties_request import TestInlineFreeformAdditionalPropertiesRequest # noqa: E501 +from petstore_api.models.test_inline_freeform_additional_properties_request import TestInlineFreeformAdditionalPropertiesRequest class TestTestInlineFreeformAdditionalPropertiesRequest(unittest.TestCase): """TestInlineFreeformAdditionalPropertiesRequest unit test stubs""" @@ -28,12 +27,12 @@ class TestTestInlineFreeformAdditionalPropertiesRequest(unittest.TestCase): def make_instance(self, include_optional) -> TestInlineFreeformAdditionalPropertiesRequest: """Test TestInlineFreeformAdditionalPropertiesRequest - include_option is a boolean, when False only required + 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 `TestInlineFreeformAdditionalPropertiesRequest` """ - model = TestInlineFreeformAdditionalPropertiesRequest() # noqa: E501 + model = TestInlineFreeformAdditionalPropertiesRequest() if include_optional: return TestInlineFreeformAdditionalPropertiesRequest( some_property = '' diff --git a/samples/openapi3/client/petstore/python/test/test_test_model_with_enum_default.py b/samples/openapi3/client/petstore/python/test/test_test_model_with_enum_default.py index 7d2029d0af9..e58802b59de 100644 --- a/samples/openapi3/client/petstore/python/test/test_test_model_with_enum_default.py +++ b/samples/openapi3/client/petstore/python/test/test_test_model_with_enum_default.py @@ -27,7 +27,7 @@ class TestTestModelWithEnumDefault(unittest.TestCase): def make_instance(self, include_optional) -> TestModelWithEnumDefault: """Test TestModelWithEnumDefault - include_option is a boolean, when False only required + 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 `TestModelWithEnumDefault` diff --git a/samples/openapi3/client/petstore/python/test/test_test_object_for_multipart_requests_request_marker.py b/samples/openapi3/client/petstore/python/test/test_test_object_for_multipart_requests_request_marker.py index 3c831caad5a..585a39c8fe6 100644 --- a/samples/openapi3/client/petstore/python/test/test_test_object_for_multipart_requests_request_marker.py +++ b/samples/openapi3/client/petstore/python/test/test_test_object_for_multipart_requests_request_marker.py @@ -27,7 +27,7 @@ class TestTestObjectForMultipartRequestsRequestMarker(unittest.TestCase): def make_instance(self, include_optional) -> TestObjectForMultipartRequestsRequestMarker: """Test TestObjectForMultipartRequestsRequestMarker - include_option is a boolean, when False only required + 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 `TestObjectForMultipartRequestsRequestMarker` diff --git a/samples/openapi3/client/petstore/python/test/test_tiger.py b/samples/openapi3/client/petstore/python/test/test_tiger.py index 83c91cea1a0..2d153c1749c 100644 --- a/samples/openapi3/client/petstore/python/test/test_tiger.py +++ b/samples/openapi3/client/petstore/python/test/test_tiger.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" +""" # noqa: E501 import unittest -import datetime -import petstore_api -from petstore_api.models.tiger import Tiger # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.tiger import Tiger class TestTiger(unittest.TestCase): """Tiger unit test stubs""" @@ -28,19 +25,19 @@ class TestTiger(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Tiger: """Test Tiger - include_option is a boolean, when False only required + 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 `Tiger` """ - model = petstore_api.models.tiger.Tiger() # noqa: E501 - if include_optional : + model = Tiger() + if include_optional: return Tiger( skill = '' ) - else : + else: return Tiger( ) """ diff --git a/samples/openapi3/client/petstore/python/test/test_unnamed_dict_with_additional_model_list_properties.py b/samples/openapi3/client/petstore/python/test/test_unnamed_dict_with_additional_model_list_properties.py index 64854cb7ee9..874af4e78f8 100644 --- a/samples/openapi3/client/petstore/python/test/test_unnamed_dict_with_additional_model_list_properties.py +++ b/samples/openapi3/client/petstore/python/test/test_unnamed_dict_with_additional_model_list_properties.py @@ -13,9 +13,8 @@ import unittest -import datetime -from petstore_api.models.unnamed_dict_with_additional_model_list_properties import UnnamedDictWithAdditionalModelListProperties # noqa: E501 +from petstore_api.models.unnamed_dict_with_additional_model_list_properties import UnnamedDictWithAdditionalModelListProperties class TestUnnamedDictWithAdditionalModelListProperties(unittest.TestCase): """UnnamedDictWithAdditionalModelListProperties unit test stubs""" @@ -28,12 +27,12 @@ class TestUnnamedDictWithAdditionalModelListProperties(unittest.TestCase): def make_instance(self, include_optional) -> UnnamedDictWithAdditionalModelListProperties: """Test UnnamedDictWithAdditionalModelListProperties - include_option is a boolean, when False only required + 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 `UnnamedDictWithAdditionalModelListProperties` """ - model = UnnamedDictWithAdditionalModelListProperties() # noqa: E501 + model = UnnamedDictWithAdditionalModelListProperties() if include_optional: return UnnamedDictWithAdditionalModelListProperties( dict_property = { diff --git a/samples/openapi3/client/petstore/python/test/test_unnamed_dict_with_additional_string_list_properties.py b/samples/openapi3/client/petstore/python/test/test_unnamed_dict_with_additional_string_list_properties.py index 832dc0c32d2..e0a94bc92dc 100644 --- a/samples/openapi3/client/petstore/python/test/test_unnamed_dict_with_additional_string_list_properties.py +++ b/samples/openapi3/client/petstore/python/test/test_unnamed_dict_with_additional_string_list_properties.py @@ -13,9 +13,8 @@ import unittest -import datetime -from petstore_api.models.unnamed_dict_with_additional_string_list_properties import UnnamedDictWithAdditionalStringListProperties # noqa: E501 +from petstore_api.models.unnamed_dict_with_additional_string_list_properties import UnnamedDictWithAdditionalStringListProperties class TestUnnamedDictWithAdditionalStringListProperties(unittest.TestCase): """UnnamedDictWithAdditionalStringListProperties unit test stubs""" @@ -28,12 +27,12 @@ class TestUnnamedDictWithAdditionalStringListProperties(unittest.TestCase): def make_instance(self, include_optional) -> UnnamedDictWithAdditionalStringListProperties: """Test UnnamedDictWithAdditionalStringListProperties - include_option is a boolean, when False only required + 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 `UnnamedDictWithAdditionalStringListProperties` """ - model = UnnamedDictWithAdditionalStringListProperties() # noqa: E501 + model = UnnamedDictWithAdditionalStringListProperties() if include_optional: return UnnamedDictWithAdditionalStringListProperties( dict_property = { diff --git a/samples/openapi3/client/petstore/python/test/test_user.py b/samples/openapi3/client/petstore/python/test/test_user.py index 174c8e06be5..19c32073322 100644 --- a/samples/openapi3/client/petstore/python/test/test_user.py +++ b/samples/openapi3/client/petstore/python/test/test_user.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.user import User # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.user import User class TestUser(unittest.TestCase): """User unit test stubs""" @@ -28,31 +25,34 @@ class TestUser(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> User: """Test User - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.user.User() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `User` + """ + model = User() + if include_optional: return User( - id = 56, - username = '', - first_name = '', - last_name = '', - email = '', - password = '', - phone = '', + id = 56, + username = '', + first_name = '', + last_name = '', + email = '', + password = '', + phone = '', user_status = 56 ) - else : + else: return User( ) + """ def testUser(self): """Test User""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_user_api.py b/samples/openapi3/client/petstore/python/test/test_user_api.py index 6df730fba2b..6b17c42093e 100644 --- a/samples/openapi3/client/petstore/python/test/test_user_api.py +++ b/samples/openapi3/client/petstore/python/test/test_user_api.py @@ -3,84 +3,82 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import petstore_api -from petstore_api.api.user_api import UserApi # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.api.user_api import UserApi class TestUserApi(unittest.TestCase): """UserApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.user_api.UserApi() # noqa: E501 + def setUp(self) -> None: + self.api = UserApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_create_user(self): + def test_create_user(self) -> None: """Test case for create_user - Create user # noqa: E501 + Create user """ pass - def test_create_users_with_array_input(self): + def test_create_users_with_array_input(self) -> None: """Test case for create_users_with_array_input - Creates list of users with given input array # noqa: E501 + Creates list of users with given input array """ pass - def test_create_users_with_list_input(self): + def test_create_users_with_list_input(self) -> None: """Test case for create_users_with_list_input - Creates list of users with given input array # noqa: E501 + Creates list of users with given input array """ pass - def test_delete_user(self): + def test_delete_user(self) -> None: """Test case for delete_user - Delete user # noqa: E501 + Delete user """ pass - def test_get_user_by_name(self): + def test_get_user_by_name(self) -> None: """Test case for get_user_by_name - Get user by user name # noqa: E501 + Get user by user name """ pass - def test_login_user(self): + def test_login_user(self) -> None: """Test case for login_user - Logs user into the system # noqa: E501 + Logs user into the system """ pass - def test_logout_user(self): + def test_logout_user(self) -> None: """Test case for logout_user - Logs out current logged in user session # noqa: E501 + Logs out current logged in user session """ pass - def test_update_user(self): + def test_update_user(self) -> None: """Test case for update_user - Updated user # noqa: E501 + Updated user """ pass diff --git a/samples/openapi3/client/petstore/python/test/test_with_nested_one_of.py b/samples/openapi3/client/petstore/python/test/test_with_nested_one_of.py index 994004dd7ab..6d8fd35bfc0 100644 --- a/samples/openapi3/client/petstore/python/test/test_with_nested_one_of.py +++ b/samples/openapi3/client/petstore/python/test/test_with_nested_one_of.py @@ -3,21 +3,18 @@ """ OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import petstore_api -from petstore_api.models.with_nested_one_of import WithNestedOneOf # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.models.with_nested_one_of import WithNestedOneOf class TestWithNestedOneOf(unittest.TestCase): """WithNestedOneOf unit test stubs""" @@ -28,25 +25,29 @@ class TestWithNestedOneOf(unittest.TestCase): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> WithNestedOneOf: """Test WithNestedOneOf - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = petstore_api.models.with_nested_one_of.WithNestedOneOf() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `WithNestedOneOf` + """ + model = WithNestedOneOf() + if include_optional: return WithNestedOneOf( - size = 56, - nested_pig = None + size = 56, + nested_pig = None, + nested_oneof_enum_string = None ) - else : + else: return WithNestedOneOf( ) + """ def testWithNestedOneOf(self): """Test WithNestedOneOf""" - #inst_req_only = self.make_instance(include_optional=False) - #inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main()