diff --git a/.github/workflows/samples-postman.yaml b/.github/workflows/samples-postman.yaml index 838271d44750..1b01d99245c1 100644 --- a/.github/workflows/samples-postman.yaml +++ b/.github/workflows/samples-postman.yaml @@ -17,7 +17,7 @@ jobs: # schema - samples/schema/postman-collection python-version: - - "3.11" + - "3.12" steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/.github/workflows/samples-python-petstore.yaml b/.github/workflows/samples-python-petstore.yaml index 118c91f84f2d..1d7ad5817fda 100644 --- a/.github/workflows/samples-python-petstore.yaml +++ b/.github/workflows/samples-python-petstore.yaml @@ -19,6 +19,7 @@ jobs: - "3.9" - "3.10" - "3.11" + - "3.12" sample: - samples/openapi3/client/petstore/python-aiohttp - samples/openapi3/client/petstore/python diff --git a/.github/workflows/samples-python-pydantic-v1-client-echo-api.yaml b/.github/workflows/samples-python-pydantic-v1-client-echo-api.yaml index 6aa3bab3b396..36f1d3960cf4 100644 --- a/.github/workflows/samples-python-pydantic-v1-client-echo-api.yaml +++ b/.github/workflows/samples-python-pydantic-v1-client-echo-api.yaml @@ -17,11 +17,11 @@ jobs: # clients - samples/client/echo_api/python-pydantic-v1/ python-version: - - "3.7" - "3.8" - "3.9" - "3.10" - "3.11" + - "3.12" steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/.github/workflows/samples-python-pydantic-v1-petstore.yaml b/.github/workflows/samples-python-pydantic-v1-petstore.yaml index 17969c9fc971..663df4ce1f36 100644 --- a/.github/workflows/samples-python-pydantic-v1-petstore.yaml +++ b/.github/workflows/samples-python-pydantic-v1-petstore.yaml @@ -19,6 +19,7 @@ jobs: - "3.9" - "3.10" - "3.11" + - "3.12" sample: - samples/openapi3/client/petstore/python-pydantic-v1-aiohttp - samples/openapi3/client/petstore/python-pydantic-v1 diff --git a/.github/workflows/samples-python-server.yaml b/.github/workflows/samples-python-server.yaml index 95ff583f0626..5e3f7675ab37 100644 --- a/.github/workflows/samples-python-server.yaml +++ b/.github/workflows/samples-python-server.yaml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.7' + python-version: '3.9' - name: Test working-directory: ${{ matrix.sample }} run: make test-all 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 ad2b8a63fe17..10a4d3ed5aa0 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 @@ -7,17 +7,31 @@ import unittest from {{apiPackage}}.{{classFilename}} import {{classname}} # noqa: E501 -class {{#operations}}Test{{classname}}(unittest.TestCase): +class {{#operations}}Test{{classname}}(unittest.{{#asyncio}}IsolatedAsyncio{{/asyncio}}TestCase): """{{classname}} unit test stubs""" + {{#asyncio}} + async def asyncSetUp(self) -> None: + self.api = {{classname}}() + + async def asyncTearDown(self) -> None: + pass + {{/asyncio}} + {{^asyncio}} def setUp(self) -> None: - self.api = {{classname}}() # noqa: E501 + self.api = {{classname}}() def tearDown(self) -> None: pass + {{/asyncio}} - {{#operation}} + {{#operation}} + {{#asyncio}} + async def test_{{operationId}}(self) -> None: + {{/asyncio}} + {{^asyncio}} def test_{{operationId}}(self) -> None: + {{/asyncio}} """Test case for {{{operationId}}} {{#summary}} diff --git a/modules/openapi-generator/src/main/resources/python-pydantic-v1/github-workflow.mustache b/modules/openapi-generator/src/main/resources/python-pydantic-v1/github-workflow.mustache index 868124c0bc55..68a9d2b508bf 100644 --- a/modules/openapi-generator/src/main/resources/python-pydantic-v1/github-workflow.mustache +++ b/modules/openapi-generator/src/main/resources/python-pydantic-v1/github-workflow.mustache @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/modules/openapi-generator/src/main/resources/python-pydantic-v1/pyproject.mustache b/modules/openapi-generator/src/main/resources/python-pydantic-v1/pyproject.mustache index 42b2ea6d356f..7bddb37b5f51 100644 --- a/modules/openapi-generator/src/main/resources/python-pydantic-v1/pyproject.mustache +++ b/modules/openapi-generator/src/main/resources/python-pydantic-v1/pyproject.mustache @@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"] include = ["{{packageName}}/py.typed"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" 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 5354d3cba7cc..963d085af18e 100644 --- a/modules/openapi-generator/src/main/resources/python/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_test.mustache @@ -7,17 +7,31 @@ import unittest from {{apiPackage}}.{{classFilename}} import {{classname}} -class {{#operations}}Test{{classname}}(unittest.TestCase): +class {{#operations}}Test{{classname}}(unittest.{{#asyncio}}IsolatedAsyncio{{/asyncio}}TestCase): """{{classname}} unit test stubs""" + {{#asyncio}} + async def asyncSetUp(self) -> None: + self.api = {{classname}}() + + async def asyncTearDown(self) -> None: + pass + {{/asyncio}} + {{^asyncio}} def setUp(self) -> None: self.api = {{classname}}() def tearDown(self) -> None: pass + {{/asyncio}} - {{#operation}} + {{#operation}} + {{#asyncio}} + async def test_{{operationId}}(self) -> None: + {{/asyncio}} + {{^asyncio}} def test_{{operationId}}(self) -> None: + {{/asyncio}} """Test case for {{{operationId}}} {{#summary}} diff --git a/modules/openapi-generator/src/main/resources/python/github-workflow.mustache b/modules/openapi-generator/src/main/resources/python/github-workflow.mustache index 868124c0bc55..68a9d2b508bf 100644 --- a/modules/openapi-generator/src/main/resources/python/github-workflow.mustache +++ b/modules/openapi-generator/src/main/resources/python/github-workflow.mustache @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/modules/openapi-generator/src/main/resources/python/pyproject.mustache b/modules/openapi-generator/src/main/resources/python/pyproject.mustache index 699acbcd43ad..8e8bce2f144e 100644 --- a/modules/openapi-generator/src/main/resources/python/pyproject.mustache +++ b/modules/openapi-generator/src/main/resources/python/pyproject.mustache @@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"] include = ["{{packageName}}/py.typed"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" @@ -33,7 +33,7 @@ pytest = ">=7.2.1" tox = ">=3.9.0" flake8 = ">=4.0.0" types-python-dateutil = ">=2.8.19.14" -mypy = "1.4.1" +mypy = ">=1.5" [build-system] diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/.github/workflows/python.yml b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/.github/workflows/python.yml index f128ba25e3dd..e0cc0c3b58ba 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/.github/workflows/python.yml +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/.github/workflows/python.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml index 0d00a14b8ebd..c4d6cf9b217e 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml @@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"] include = ["openapi_client/py.typed"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" @@ -22,7 +22,7 @@ pytest = ">=7.2.1" tox = ">=3.9.0" flake8 = ">=4.0.0" types-python-dateutil = ">=2.8.19.14" -mypy = "1.4.1" +mypy = ">=1.5" [build-system] diff --git a/samples/client/echo_api/python-pydantic-v1/.github/workflows/python.yml b/samples/client/echo_api/python-pydantic-v1/.github/workflows/python.yml index f128ba25e3dd..e0cc0c3b58ba 100644 --- a/samples/client/echo_api/python-pydantic-v1/.github/workflows/python.yml +++ b/samples/client/echo_api/python-pydantic-v1/.github/workflows/python.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/samples/client/echo_api/python-pydantic-v1/pyproject.toml b/samples/client/echo_api/python-pydantic-v1/pyproject.toml index caaec1be1b2a..192e7c548361 100644 --- a/samples/client/echo_api/python-pydantic-v1/pyproject.toml +++ b/samples/client/echo_api/python-pydantic-v1/pyproject.toml @@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"] include = ["openapi_client/py.typed"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" diff --git a/samples/client/echo_api/python/.github/workflows/python.yml b/samples/client/echo_api/python/.github/workflows/python.yml index f128ba25e3dd..e0cc0c3b58ba 100644 --- a/samples/client/echo_api/python/.github/workflows/python.yml +++ b/samples/client/echo_api/python/.github/workflows/python.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/samples/client/echo_api/python/pyproject.toml b/samples/client/echo_api/python/pyproject.toml index 0d00a14b8ebd..c4d6cf9b217e 100644 --- a/samples/client/echo_api/python/pyproject.toml +++ b/samples/client/echo_api/python/pyproject.toml @@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"] include = ["openapi_client/py.typed"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" @@ -22,7 +22,7 @@ pytest = ">=7.2.1" tox = ">=3.9.0" flake8 = ">=4.0.0" types-python-dateutil = ">=2.8.19.14" -mypy = "1.4.1" +mypy = ">=1.5" [build-system] diff --git a/samples/openapi3/client/petstore/python-aiohttp/.github/workflows/python.yml b/samples/openapi3/client/petstore/python-aiohttp/.github/workflows/python.yml index fed030f265ed..a351cfc7fd74 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/.github/workflows/python.yml +++ b/samples/openapi3/client/petstore/python-aiohttp/.github/workflows/python.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/samples/openapi3/client/petstore/python-aiohttp/pyproject.toml b/samples/openapi3/client/petstore/python-aiohttp/pyproject.toml index 1263eb6a3562..20fab55a6ee0 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/pyproject.toml +++ b/samples/openapi3/client/petstore/python-aiohttp/pyproject.toml @@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"] include = ["petstore_api/py.typed"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" @@ -26,7 +26,7 @@ pytest = ">=7.2.1" tox = ">=3.9.0" flake8 = ">=4.0.0" types-python-dateutil = ">=2.8.19.14" -mypy = "1.4.1" +mypy = ">=1.5" [build-system] diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_additional_properties_any_type.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_additional_properties_any_type.py index c2c9c7c58069..48603ddb4033 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_additional_properties_any_type.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_additional_properties_class.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_additional_properties_class.py index e3b48bedd571..0261c8f4a004 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_additional_properties_object.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_additional_properties_object.py index b68a8fda5790..8b0dccef5647 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_additional_properties_object.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_additional_properties_with_description_only.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_additional_properties_with_description_only.py index d5166dfe1342..698f5f8d8994 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_additional_properties_with_description_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_all_of_super_model.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_all_of_super_model.py index dfc6d444ba7a..0b37180a54c1 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_all_of_super_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_all_of_super_model.py @@ -27,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_all_of_with_single_ref.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_all_of_with_single_ref.py index bfc2b41286ac..ff147a1bc4e5 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_all_of_with_single_ref.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,20 +25,23 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_animal.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_animal.py index 52b23c726457..4ea318679b61 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_animal.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,21 +25,24 @@ def setUp(self): 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( - class_name = '', + class_name = '', color = 'red' ) - else : + else: return Animal( class_name = '', ) + """ def testAnimal(self): """Test Animal""" 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 d95798cfc5a4..89c28d0ff7e8 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 @@ -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): +class TestAnotherFakeApi(unittest.IsolatedAsyncioTestCase): """AnotherFakeApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.another_fake_api.AnotherFakeApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = AnotherFakeApi() - def tearDown(self): + async def asyncTearDown(self) -> None: pass - def test_call_123_test_special_tags(self): + async 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-aiohttp/test/test_any_of_color.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_any_of_color.py index 2a97cfef7526..f6092af623a7 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_any_of_color.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_any_of_pig.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_any_of_pig.py index 1c9efe4160f4..e69d8f25900a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_any_of_pig.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,24 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AnyOfPig: """Test AnyOfPig - 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.any_of_pig.AnyOfPig() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AnyOfPig` + """ + model = AnyOfPig() + if include_optional: return AnyOfPig( - class_name = '', - color = '', + class_name = '', + color = '', size = 56 ) - else : + else: return AnyOfPig( class_name = '', color = '', size = 56, ) + """ def testAnyOfPig(self): """Test AnyOfPig""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_array_of_array_of_model.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_array_of_array_of_model.py index 06b560c40021..a96ea540171c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_array_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,15 +25,15 @@ def setUp(self): 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( another_property = [ [ @@ -46,7 +43,7 @@ def make_instance(self, include_optional): ] ] ) - else : + else: return ArrayOfArrayOfModel( ) """ diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_array_of_array_of_number_only.py index 341841c4050b..bd89ba2188dd 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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,9 +41,10 @@ def make_instance(self, include_optional): ] ] ) - else : + else: return ArrayOfArrayOfNumberOnly( ) + """ def testArrayOfArrayOfNumberOnly(self): """Test ArrayOfArrayOfNumberOnly""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_array_of_number_only.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_array_of_number_only.py index cf27c8a8fd72..f67af039fcef 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,21 +25,24 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_array_test.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_array_test.py index c26470404d7f..21ce90c4c2ca 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_array_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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,9 +54,10 @@ def make_instance(self, include_optional): ] ] ) - else : + else: return ArrayTest( ) + """ def testArrayTest(self): """Test ArrayTest""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_base_discriminator.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_base_discriminator.py index 61c40f7f6809..05ed4b3d4da3 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_base_discriminator.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_base_discriminator.py @@ -27,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_basque_pig.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_basque_pig.py index 99eeb77f8073..f79d16cd8585 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_basque_pig.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,22 +25,25 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_bathing.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_bathing.py index 583bdcbb09ec..f2b6a75a95a4 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_bathing.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_bathing.py @@ -13,7 +13,6 @@ import unittest -import datetime from petstore_api.models.bathing import Bathing @@ -28,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_capitalization.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_capitalization.py index 7a1b46e714c7..6e8f95b7acfd 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_capitalization.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,24 +25,27 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_cat.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_cat.py index 03549dffe93c..15034d82ed3b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_cat.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,19 +25,22 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Cat: """Test Cat - 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.cat.Cat() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Cat` + """ + model = Cat() + if include_optional: return Cat( declawed = True ) - else : + else: return Cat( ) + """ def testCat(self): """Test Cat""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_category.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_category.py index 14848fcebcd2..014917bf17f4 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_category.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_circular_all_of_ref.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_circular_all_of_ref.py index 767c758a733b..9d81ff91b15a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_circular_all_of_ref.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_circular_all_of_ref.py @@ -27,7 +27,7 @@ def tearDown(self): 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 @@ def make_instance(self, include_optional) -> CircularAllOfRef: 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-aiohttp/test/test_circular_reference_model.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_circular_reference_model.py index f734d3fc0ff6..18148b2b7d1a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_circular_reference_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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 @@ def make_instance(self, include_optional): nested = petstore_api.models.first_ref.FirstRef( category = '', ), ), ), ) ) - else : + else: return CircularReferenceModel( ) """ diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_class_model.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_class_model.py index 9e5190a81b72..1826cbf53983 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_class_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,19 +25,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_client.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_client.py index 9a9311d6e7ed..1586543c171c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_client.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,19 +25,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_color.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_color.py index 9a7aabfea253..2ebb0ec04dee 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_color.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_creature.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_creature.py index 66b3e088cbbf..eab8f68f3a57 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_creature.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_creature_info.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_creature_info.py index 0a85d5ffe7b2..d645563a4791 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_creature_info.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_danish_pig.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_danish_pig.py index 0fee5e18d9bd..1dc992542c41 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_danish_pig.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,22 +25,25 @@ def setUp(self): 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""" 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 50e7c57bd0bf..a0e95f5d9ebd 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 @@ -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): +class TestDefaultApi(unittest.IsolatedAsyncioTestCase): """DefaultApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.default_api.DefaultApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = DefaultApi() - def tearDown(self): + async def asyncTearDown(self) -> None: pass - def test_foo_get(self): + async def test_foo_get(self) -> None: """Test case for foo_get """ diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_deprecated_object.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_deprecated_object.py index e4a2982cc0dd..e63842997ae6 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_deprecated_object.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,19 +25,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_discriminator_all_of_sub.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_discriminator_all_of_sub.py index 15941f4f854a..f52f3d33f13c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_discriminator_all_of_sub.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_discriminator_all_of_sub.py @@ -27,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_discriminator_all_of_super.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_discriminator_all_of_super.py index 503d6b3c558c..830fa0a829a1 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_discriminator_all_of_super.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_discriminator_all_of_super.py @@ -27,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_dog.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_dog.py index 797b34f2f793..c11f61c99c04 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_dog.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,19 +25,22 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Dog: """Test Dog - 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.dog.Dog() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Dog` + """ + model = Dog() + if include_optional: return Dog( breed = '' ) - else : + else: return Dog( ) + """ def testDog(self): """Test Dog""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_dummy_model.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_dummy_model.py index d6562c58bc2d..8b276ec140b0 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_dummy_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_enum_arrays.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_arrays.py index 52cc98601bc0..f3d731b3f59c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_arrays.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_enum_class.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_class.py index 9d7a81272cd2..5730ded0ad30 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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-aiohttp/test/test_enum_string1.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_string1.py index 9dbe9eb44fb8..e6a858841203 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_string1.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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-aiohttp/test/test_enum_string2.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_string2.py index 4ec0ffcd86c7..6a52c081d3ca 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_string2.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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-aiohttp/test/test_enum_test.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_enum_test.py index 2cdb478cd154..e83daf724588 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 @@ -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,23 +25,33 @@ def setUp(self): 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 + 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', + 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-aiohttp/test/test_fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_fake_api.py index f093a95d7d8b..902c6faa7224 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 @@ -3,134 +3,270 @@ """ 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_api import FakeApi # noqa: E501 -from petstore_api.rest import ApiException +from petstore_api.api.fake_api import FakeApi -class TestFakeApi(unittest.TestCase): +class TestFakeApi(unittest.IsolatedAsyncioTestCase): """FakeApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.fake_api.FakeApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = FakeApi() + + async def asyncTearDown(self) -> None: + pass + + async def test_fake_any_type_request_body(self) -> None: + """Test case for fake_any_type_request_body - def tearDown(self): + test any type request body + """ pass - def test_fake_health_get(self): + async def test_fake_enum_ref_query_parameter(self) -> None: + """Test case for fake_enum_ref_query_parameter + + test enum reference query parameter + """ + pass + + async 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): + async 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): + async def test_fake_outer_boolean_serialize(self) -> None: """Test case for fake_outer_boolean_serialize """ pass - def test_fake_outer_composite_serialize(self): + async def test_fake_outer_composite_serialize(self) -> None: """Test case for fake_outer_composite_serialize """ pass - def test_fake_outer_number_serialize(self): + async def test_fake_outer_number_serialize(self) -> None: """Test case for fake_outer_number_serialize """ pass - def test_fake_outer_string_serialize(self): + async def test_fake_outer_string_serialize(self) -> None: """Test case for fake_outer_string_serialize """ pass - def test_fake_property_enum_integer_serialize(self): + async def test_fake_property_enum_integer_serialize(self) -> None: """Test case for fake_property_enum_integer_serialize """ pass - def test_test_body_with_binary(self): + async def test_fake_ref_enum_string(self) -> None: + """Test case for fake_ref_enum_string + + test ref to enum string + """ + pass + + async def test_fake_return_boolean(self) -> None: + """Test case for fake_return_boolean + + test returning boolean + """ + pass + + async def test_fake_return_byte_like_json(self) -> None: + """Test case for fake_return_byte_like_json + + test byte like json + """ + pass + + async def test_fake_return_enum(self) -> None: + """Test case for fake_return_enum + + test returning enum + """ + pass + + async def test_fake_return_enum_like_json(self) -> None: + """Test case for fake_return_enum_like_json + + test enum like json + """ + pass + + async def test_fake_return_float(self) -> None: + """Test case for fake_return_float + + test returning float + """ + pass + + async def test_fake_return_int(self) -> None: + """Test case for fake_return_int + + test returning int + """ + pass + + async def test_fake_return_list_of_objects(self) -> None: + """Test case for fake_return_list_of_objects + + test returning list of objects + """ + pass + + async def test_fake_return_str_like_json(self) -> None: + """Test case for fake_return_str_like_json + + test str like json + """ + pass + + async def test_fake_return_string(self) -> None: + """Test case for fake_return_string + + test returning string + """ + pass + + async def test_fake_uuid_example(self) -> None: + """Test case for fake_uuid_example + + test uuid example + """ + pass + + async def test_test_additional_properties_reference(self) -> None: + """Test case for test_additional_properties_reference + + test referenced additionalProperties + """ + pass + + async def test_test_body_with_binary(self) -> None: """Test case for test_body_with_binary """ pass - def test_test_body_with_file_schema(self): + async 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): + async def test_test_body_with_query_params(self) -> None: """Test case for test_body_with_query_params """ pass - def test_test_client_model(self): + async def test_test_client_model(self) -> None: """Test case for test_client_model - To test \"client\" model # noqa: E501 + To test \"client\" model + """ + pass + + async def test_test_date_time_query_parameter(self) -> None: + """Test case for test_date_time_query_parameter + """ pass - def test_test_endpoint_parameters(self): + async 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 + + async 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 + + async def test_test_error_responses_with_model(self) -> None: + """Test case for test_error_responses_with_model + + test error responses with model """ pass - def test_test_group_parameters(self): + async 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): + async def test_test_inline_additional_properties(self) -> None: """Test case for test_inline_additional_properties - test inline additionalProperties # noqa: E501 + test inline additionalProperties + """ + pass + + async 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): + async 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 + + async 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): + async def test_test_query_parameter_collection_format(self) -> None: """Test case for test_query_parameter_collection_format """ pass + async def test_test_string_map_reference(self) -> None: + """Test case for test_string_map_reference + + test referenced string map + """ + 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 77de8cafee2d..db43948df4d5 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 @@ -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.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): +class TestFakeClassnameTags123Api(unittest.IsolatedAsyncioTestCase): """FakeClassnameTags123Api unit test stubs""" - def setUp(self): - self.api = petstore_api.api.fake_classname_tags123_api.FakeClassnameTags123Api() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = FakeClassnameTags123Api() - def tearDown(self): + async def asyncTearDown(self) -> None: pass - def test_test_classname(self): + async 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-aiohttp/test/test_feeding.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_feeding.py index a0cdfc8f3460..fc9d904716ee 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_feeding.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_feeding.py @@ -13,7 +13,6 @@ import unittest -import datetime from petstore_api.models.feeding import Feeding @@ -28,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_file.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_file.py index 260624562e45..d050f5982464 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_file.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,19 +25,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_file_schema_test_class.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_file_schema_test_class.py index ef13e7993368..ebbf1f587051 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,24 +25,27 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_first_ref.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_first_ref.py index bcec1c0334bf..38520ad2e63b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_first_ref.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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 @@ def make_instance(self, include_optional): nested = petstore_api.models.first_ref.FirstRef( category = '', ), ), ) ) - else : + else: return FirstRef( ) """ diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_foo.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_foo.py index 9dcc9c2e3f4a..430ee19bf695 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_foo.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,19 +25,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_foo_get_default_response.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_foo_get_default_response.py index b517c9b45837..c5524b88d2bb 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_foo_get_default_response.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,20 +25,23 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_format_test.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_format_test.py index 0426b9ce8d0e..8cde3f67815c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_format_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,37 +25,41 @@ def setUp(self): 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 = 32.1, - float = 54.3, - double = 67.8, - string = 'a', - byte = 'YQ==', - 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, + 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', pattern_with_digits_and_delimiter = 'image_480' ) - else : + else: return FormatTest( number = 32.1, - byte = 'YQ==', - _date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + var_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), password = '0123456789', ) + """ def testFormatTest(self): """Test FormatTest""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_has_only_read_only.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_has_only_read_only.py index 93a604cc3157..59013015dc71 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,20 +25,23 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_health_check_result.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_health_check_result.py index e2a7fbcfbaf0..a50444e6d877 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_health_check_result.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,19 +25,22 @@ def setUp(self): 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""" 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 6cd4fb8cbaf5..c8effe2e53a9 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 @@ -17,16 +17,16 @@ from petstore_api.api.import_test_datetime_api import ImportTestDatetimeApi -class TestImportTestDatetimeApi(unittest.TestCase): +class TestImportTestDatetimeApi(unittest.IsolatedAsyncioTestCase): """ImportTestDatetimeApi unit test stubs""" - def setUp(self) -> None: + async def asyncSetUp(self) -> None: self.api = ImportTestDatetimeApi() - def tearDown(self) -> None: + async def asyncTearDown(self) -> None: pass - def test_import_test_return_datetime(self) -> None: + async def test_import_test_return_datetime(self) -> None: """Test case for import_test_return_datetime test date time diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_info.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_info.py index e1fce9f9c1ec..47075061d9a9 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_info.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_info.py @@ -27,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_inner_dict_with_property.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_inner_dict_with_property.py index 8a63b70d5524..1f80e90e29dd 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_inner_dict_with_property.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_input_all_of.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_input_all_of.py index 7ca8140d4d40..212f59bea795 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_input_all_of.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_input_all_of.py @@ -27,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_int_or_string.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_int_or_string.py index 0de76602cb69..a649aac24694 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_int_or_string.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_list_class.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_list_class.py index ac14bf3b3986..7da7d021f776 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_list_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def tearDown(self): 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-aiohttp/test/test_map_of_array_of_model.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_map_of_array_of_model.py index 31ad486f5c03..2d5637f8f34b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_map_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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 @@ def make_instance(self, include_optional): ] } ) - else : + else: return MapOfArrayOfModel( ) """ diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_map_test.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_map_test.py index 2618f59446fd..6d15e3d0b344 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_map_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,32 +25,35 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_mixed_properties_and_additional_properties_class.py index ec7666d4b0c4..33d884c768ba 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,25 +25,28 @@ def setUp(self): 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( class_name = '', color = 'red', ) } ) - else : + else: return MixedPropertiesAndAdditionalPropertiesClass( ) + """ def testMixedPropertiesAndAdditionalPropertiesClass(self): """Test MixedPropertiesAndAdditionalPropertiesClass""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_model200_response.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_model200_response.py index 343e3109ae08..007f8a623959 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_model200_response.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,20 +25,23 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_model_api_response.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_model_api_response.py index f37f34084401..beca8e34434f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_model_api_response.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def tearDown(self): 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-aiohttp/test/test_model_field.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_model_field.py index 315823b80622..eb8dee7981c3 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_model_field.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_model_field.py @@ -27,7 +27,7 @@ def tearDown(self): 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 @@ def make_instance(self, include_optional) -> ModelField: model = ModelField() if include_optional: return ModelField( - dummy = '' + var_field = '' ) else: return ModelField( diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_model_return.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_model_return.py index cd4afbbf9732..2c2afa1d43bb 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_model_return.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,19 +25,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_name.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_name.py index a5114ce3a371..db4e9cf37e94 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_name.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,23 +25,26 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_nullable_class.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_nullable_class.py index a1ccadef2413..ecf5363b4ac7 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_nullable_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,44 +25,47 @@ def setUp(self): 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'), + 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'), 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, ) + """ def testNullableClass(self): """Test NullableClass""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_nullable_property.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_nullable_property.py index 34129457b1d7..52bdc7874ed6 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_nullable_property.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_number_only.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_number_only.py index 0d3a7bfcc63d..78d7c5cff926 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_number_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,19 +25,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_object_to_test_additional_properties.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_object_to_test_additional_properties.py index f1f354cad251..62c9c5058656 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_object_to_test_additional_properties.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_object_with_deprecated_fields.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_object_with_deprecated_fields.py index f51638ec7b6f..bf6bf779339c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_object_with_deprecated_fields.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,25 +25,28 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_one_of_enum_string.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_one_of_enum_string.py index ed959c1479c2..0434db164a7e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_one_of_enum_string.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_order.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_order.py index feea3c6f5646..a9b4980702da 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_order.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,24 +25,27 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_composite.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_composite.py index 9fb62a1397da..5024f1c483aa 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_composite.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,21 +25,24 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_enum.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_enum.py index a925744023d6..2f82ecc94ba1 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_enum.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_enum_default_value.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_enum_default_value.py index f8fba3bd79ad..2a7ff27a8245 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_enum_default_value.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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-aiohttp/test/test_outer_enum_integer.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_enum_integer.py index ce1e47c61b14..d74dcb0981a9 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_enum_integer.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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-aiohttp/test/test_outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_enum_integer_default_value.py index 3fed147cc50c..230db8cb8176 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_object_with_enum_property.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_object_with_enum_property.py index 35258d5d74ac..a1c896ae6610 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_outer_object_with_enum_property.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_parent.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_parent.py index 2a74505f08a1..ea1242c24f4e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_parent.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_parent_with_optional_dict.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_parent_with_optional_dict.py index 25b769e3d390..7cc74f9e98ec 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_parent_with_optional_dict.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_pet.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_pet.py index 1b98295f4d11..3edc400fafcb 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_pet.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,36 +25,39 @@ def setUp(self): 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', + 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""" 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 77665df879f1..278abd0f0c42 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 @@ -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): +class TestPetApi(unittest.IsolatedAsyncioTestCase): """PetApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.pet_api.PetApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = PetApi() - def tearDown(self): + async def asyncTearDown(self) -> None: pass - def test_add_pet(self): + async 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): + async 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): + async 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): + async 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): + async 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): + async 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): + async 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): + async 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): + async 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-aiohttp/test/test_pig.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_pig.py index 38389bae3ce8..c336579232b0 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_pig.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,24 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Pig: """Test Pig - 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.pig.Pig() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Pig` + """ + model = Pig() + if include_optional: return Pig( - class_name = '', - color = '', + class_name = '', + color = '', size = 56 ) - else : + else: return Pig( class_name = '', color = '', size = 56, ) + """ def testPig(self): """Test Pig""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_poop_cleaning.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_poop_cleaning.py index 4c94fddca97a..5a12f965aefe 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_poop_cleaning.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def tearDown(self): 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-aiohttp/test/test_primitive_string.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_primitive_string.py index 8b9ccf59893b..67ec90914d0f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_primitive_string.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_primitive_string.py @@ -27,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_property_map.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_property_map.py index 3934a29432ed..2f2fed72a136 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_property_map.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_property_map.py @@ -27,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_property_name_collision.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_property_name_collision.py index 17d9f52bf1da..ab7919c7e6a9 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_property_name_collision.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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( - type = '', - type = '', - type_ = '' + underscore_type = '', + type = '', + type_with_underscore = '' ) - else : + else: return PropertyNameCollision( ) """ diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_read_only_first.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_read_only_first.py index a8b070b3631a..ec7a1aa24140 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_read_only_first.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,20 +25,23 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_second_circular_all_of_ref.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_second_circular_all_of_ref.py index 5e6d12f756bd..21d9005a5e82 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_second_circular_all_of_ref.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_second_circular_all_of_ref.py @@ -27,7 +27,7 @@ def tearDown(self): 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 @@ def make_instance(self, include_optional) -> SecondCircularAllOfRef: 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-aiohttp/test/test_second_ref.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_second_ref.py index 782892fd4e17..f6117988c198 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_second_ref.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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 @@ def make_instance(self, include_optional): self_ref = petstore_api.models.second_ref.SecondRef( category = '', ), ), ) ) - else : + else: return SecondRef( ) """ diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_self_reference_model.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_self_reference_model.py index b3dd7ada2b2a..018bcd195b64 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_self_reference_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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 @@ def make_instance(self, include_optional): nested = petstore_api.models.dummy_model.Dummy-Model( category = '', ), ), ) ) - else : + else: return SelfReferenceModel( ) """ diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_single_ref_type.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_single_ref_type.py index 31fbb0960ffe..630b1c137087 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_single_ref_type.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_special_character_enum.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_special_character_enum.py index 028f55599e49..464808e61b09 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_special_character_enum.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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-aiohttp/test/test_special_model_name.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_special_model_name.py index 3553b6c41be3..e913fa28f51e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_special_model_name.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,19 +25,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_special_name.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_special_name.py index 37a7235a8c39..153768c98984 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_special_name.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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', ), + name = 'default-name', ), var_schema = 'available' ) - else : + else: return SpecialName( ) """ 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 81848d24a67e..166821bab54e 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 @@ -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): +class TestStoreApi(unittest.IsolatedAsyncioTestCase): """StoreApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.store_api.StoreApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = StoreApi() - def tearDown(self): + async def asyncTearDown(self) -> None: pass - def test_delete_order(self): + async 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): + async 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): + async 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): + async 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-aiohttp/test/test_tag.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_tag.py index e75884bc136e..92061e615e28 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_tag.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,20 +25,23 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_task.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_task.py index bbbc14a39928..0044da80776b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_task.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_task.py @@ -13,7 +13,6 @@ import unittest -import datetime from petstore_api.models.task import Task @@ -28,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_task_activity.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_task_activity.py index 2d56d9c5ad3e..bd25e5887ac4 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_task_activity.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def tearDown(self): 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-aiohttp/test/test_test_error_responses_with_model400_response.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_test_error_responses_with_model400_response.py index 35db7ba74fb7..72d243b82fc4 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_test_error_responses_with_model400_response.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def tearDown(self): 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-aiohttp/test/test_test_error_responses_with_model404_response.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_test_error_responses_with_model404_response.py index e9c97c0f484b..fff790172b14 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_test_error_responses_with_model404_response.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def tearDown(self): 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-aiohttp/test/test_test_inline_freeform_additional_properties_request.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_test_inline_freeform_additional_properties_request.py index 5c40397bc913..add42258580a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_test_inline_freeform_additional_properties_request.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def tearDown(self): 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-aiohttp/test/test_test_model_with_enum_default.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_test_model_with_enum_default.py index 7d2029d0af92..e58802b59de7 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_test_model_with_enum_default.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_test_model_with_enum_default.py @@ -27,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_test_object_for_multipart_requests_request_marker.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_test_object_for_multipart_requests_request_marker.py index 3c831caad5a0..585a39c8fe6b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_test_object_for_multipart_requests_request_marker.py +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_test_object_for_multipart_requests_request_marker.py @@ -27,7 +27,7 @@ def tearDown(self): 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-aiohttp/test/test_tiger.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_tiger.py index 83c91cea1a0d..2d153c1749c3 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_tiger.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_unnamed_dict_with_additional_model_list_properties.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_unnamed_dict_with_additional_model_list_properties.py index 64854cb7ee97..874af4e78f8b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_unnamed_dict_with_additional_model_list_properties.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def tearDown(self): 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-aiohttp/test/test_unnamed_dict_with_additional_string_list_properties.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_unnamed_dict_with_additional_string_list_properties.py index 832dc0c32d2a..e0a94bc92dc1 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_unnamed_dict_with_additional_string_list_properties.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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 @@ def tearDown(self): 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-aiohttp/test/test_user.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_user.py index b19c3a7443f5..19c320733220 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_user.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,26 +25,29 @@ def setUp(self): 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""" 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 6df730fba2b1..ba67311e3932 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 @@ -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): +class TestUserApi(unittest.IsolatedAsyncioTestCase): """UserApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.user_api.UserApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = UserApi() - def tearDown(self): + async def asyncTearDown(self) -> None: pass - def test_create_user(self): + async 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): + async 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): + async 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): + async 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): + async 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): + async 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): + async 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): + async 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-aiohttp/test/test_with_nested_one_of.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_with_nested_one_of.py index a0123fd14c42..6d8fd35bfc08 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_with_nested_one_of.py +++ b/samples/openapi3/client/petstore/python-aiohttp/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,20 +25,24 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-aiohttp/tests/test_api_client.py b/samples/openapi3/client/petstore/python-aiohttp/tests/test_api_client.py index fbcd7485a9c1..bf0d961ee8e5 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/tests/test_api_client.py +++ b/samples/openapi3/client/petstore/python-aiohttp/tests/test_api_client.py @@ -5,16 +5,12 @@ import unittest import weakref -from tests.util import async_test import petstore_api HOST = 'http://localhost/v2' -class TestApiClient(unittest.TestCase): - - @async_test +class TestApiClient(unittest.IsolatedAsyncioTestCase): async def test_context_manager_closes_client(self): - async with petstore_api.ApiClient() as client: # pool_manager self.assertFalse(client.rest_client.pool_manager.closed) @@ -22,30 +18,29 @@ async def test_context_manager_closes_client(self): self.assertTrue(rest_pool_ref.closed) - @async_test async def test_ignore_operation_servers(self): config = petstore_api.Configuration(host=HOST) - client = petstore_api.ApiClient(config) - user_api_instance = petstore_api.api.user_api.UserApi(client) - - config_ignore = petstore_api.Configuration(host=HOST, ignore_operation_servers=True) - client_ignore = petstore_api.ApiClient(config_ignore) - user_api_instance_ignore = petstore_api.api.user_api.UserApi(client_ignore) - - params_to_serialize = { - 'user': petstore_api.User(id=1, username='test'), - '_request_auth': None, - '_content_type': 'application/json', - '_headers': None, - '_host_index': 0 - } - - # operation servers should be used - _, url, *_ = user_api_instance._create_user_serialize(**params_to_serialize) - self.assertEqual(client.configuration.host, HOST) - self.assertEqual(url, 'http://petstore.swagger.io/v2/user') - - # operation servers should be ignored - _, url_ignore, *_ = user_api_instance_ignore._create_user_serialize(**params_to_serialize) - self.assertEqual(client.configuration.host, HOST) - self.assertEqual(url_ignore, HOST + '/user') + async with petstore_api.ApiClient(config) as client: + user_api_instance = petstore_api.api.user_api.UserApi(client) + + config_ignore = petstore_api.Configuration(host=HOST, ignore_operation_servers=True) + client_ignore = petstore_api.ApiClient(config_ignore) + user_api_instance_ignore = petstore_api.api.user_api.UserApi(client_ignore) + + params_to_serialize = { + 'user': petstore_api.User(id=1, username='test'), + '_request_auth': None, + '_content_type': 'application/json', + '_headers': None, + '_host_index': 0 + } + + # operation servers should be used + _, url, *_ = user_api_instance._create_user_serialize(**params_to_serialize) + self.assertEqual(client.configuration.host, HOST) + self.assertEqual(url, 'http://petstore.swagger.io/v2/user') + + # operation servers should be ignored + _, url_ignore, *_ = user_api_instance_ignore._create_user_serialize(**params_to_serialize) + self.assertEqual(client.configuration.host, HOST) + self.assertEqual(url_ignore, HOST + '/user') diff --git a/samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py b/samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py index d6dcdebd146a..ad2c397d05e1 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py @@ -20,7 +20,7 @@ from petstore_api import Configuration from petstore_api.rest import ApiException -from .util import id_gen, async_test +from .util import id_gen import json @@ -29,9 +29,8 @@ HOST = 'http://localhost:80/v2' -class TestPetApiTests(unittest.TestCase): - - def setUp(self): +class TestPetApiTests(unittest.IsolatedAsyncioTestCase): + async def asyncSetUp(self): config = Configuration() config.host = HOST @@ -40,6 +39,9 @@ def setUp(self): self.setUpModels() self.setUpFiles() + async def asyncTearDown(self): + await self.api_client.close() + def setUpModels(self): self.category = petstore_api.Category(id=id_gen(), name="dog") #self.category.id = id_gen() @@ -88,7 +90,6 @@ def test_separate_default_config_instances(self): pet_api2 = petstore_api.PetApi() self.assertEqual(id(pet_api.api_client.configuration), id(pet_api2.api_client.configuration)) - @async_test async def test_async_with_result(self): await self.pet_api.add_pet(self.pet) assert self.pet.id is not None @@ -106,7 +107,6 @@ async def test_async_with_result(self): self.assertEqual(response.id, self.pet.id) self.assertEqual(len(responses), 2) - @async_test async def test_exception(self): await self.pet_api.add_pet(self.pet) @@ -118,7 +118,6 @@ async def test_exception(self): self.assertIsInstance(exception, ApiException) self.assertEqual(exception.status, 404) - @async_test async def test_add_pet_and_get_pet_by_id(self): await self.pet_api.add_pet(self.pet) assert self.pet.id is not None @@ -129,7 +128,6 @@ async def test_add_pet_and_get_pet_by_id(self): assert fetched.category is not None self.assertEqual(self.pet.category.name, fetched.category.name) - @async_test async def test_add_pet_and_get_pet_by_id_with_http_info(self): await self.pet_api.add_pet(self.pet) assert self.pet.id is not None @@ -140,7 +138,6 @@ async def test_add_pet_and_get_pet_by_id_with_http_info(self): assert fetched.data.category is not None self.assertEqual(self.pet.category.name, fetched.data.category.name) - @async_test async def test_add_pet_and_get_pet_by_id_without_preload_content(self): await self.pet_api.add_pet(self.pet) assert self.pet.id is not None @@ -154,7 +151,6 @@ async def test_add_pet_and_get_pet_by_id_without_preload_content(self): self.assertEqual(await fetched.content.read(), b'') self.assertTrue(read.decode("utf-8").startswith('{"id":')) - @async_test async def test_update_pet(self): self.pet.name = "hello kity with updated" await self.pet_api.update_pet(self.pet) @@ -167,7 +163,6 @@ async def test_update_pet(self): assert fetched.category is not None self.assertEqual(fetched.category.name, self.pet.category.name) - @async_test async def test_find_pets_by_status(self): await self.pet_api.add_pet(self.pet) assert self.pet.status is not None @@ -177,7 +172,6 @@ async def test_find_pets_by_status(self): list(map(lambda x: getattr(x, 'id'), pets)) ) - @async_test async def test_find_pets_by_tags(self): await self.pet_api.add_pet(self.pet) assert self.tag.name is not None @@ -187,7 +181,6 @@ async def test_find_pets_by_tags(self): list(map(lambda x: getattr(x, 'id'), pets)) ) - @async_test async def test_update_pet_with_form(self): await self.pet_api.add_pet(self.pet) assert self.pet.id is not None @@ -201,7 +194,6 @@ async def test_update_pet_with_form(self): self.assertEqual(name, fetched.name) self.assertEqual(status, fetched.status) - @async_test async def test_upload_file(self): # upload file with form parameter try: @@ -221,7 +213,6 @@ async def test_upload_file(self): except ApiException as e: self.fail("upload_file() raised {0} unexpectedly".format(type(e))) - @async_test async def test_delete_pet(self): await self.pet_api.add_pet(self.pet) assert self.pet.id is not None @@ -233,7 +224,6 @@ async def test_delete_pet(self): except ApiException as e: self.assertEqual(404, e.status) - @async_test async def test_proxy(self): config = Configuration() # set not-existent proxy and catch an error to verify that diff --git a/samples/openapi3/client/petstore/python-aiohttp/tests/util.py b/samples/openapi3/client/petstore/python-aiohttp/tests/util.py index 4ab082872660..113d7dcc5478 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/tests/util.py +++ b/samples/openapi3/client/petstore/python-aiohttp/tests/util.py @@ -1,19 +1,8 @@ # flake8: noqa -import asyncio import random def id_gen(bits=32): """ Returns a n-bit randomly generated int """ return int(random.getrandbits(bits)) - - -def async_test(f): - def wrapper(*args, **kwargs): - # coro = asyncio.coroutine(f) - coro = f - future = coro(*args, **kwargs) - loop = asyncio.get_event_loop() - loop.run_until_complete(future) - return wrapper diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.github/workflows/python.yml b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.github/workflows/python.yml index fed030f265ed..a351cfc7fd74 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.github/workflows/python.yml +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.github/workflows/python.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/pyproject.toml b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/pyproject.toml index 8c0a993b36fa..d65781e4a8a8 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/pyproject.toml +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/pyproject.toml @@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"] include = ["petstore_api/py.typed"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_additional_properties_any_type.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_additional_properties_any_type.py index c2c9c7c58069..a1669f0664d2 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_additional_properties_any_type.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_additional_properties_class.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_additional_properties_class.py index e3b48bedd571..d1dc12c44584 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_additional_properties_object.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_additional_properties_object.py index b68a8fda5790..9bfa2a0cde83 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_additional_properties_object.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_additional_properties_with_description_only.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_additional_properties_with_description_only.py index d5166dfe1342..88df1cc92955 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_additional_properties_with_description_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_all_of_with_single_ref.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_all_of_with_single_ref.py index bfc2b41286ac..920ad3782e15 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_all_of_with_single_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,20 +26,23 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_animal.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_animal.py index 52b23c726457..b0b62a0bb2b3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_animal.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,21 +26,24 @@ def setUp(self): 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""" 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 d95798cfc5a4..4066eae53a86 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 @@ -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): +class TestAnotherFakeApi(unittest.IsolatedAsyncioTestCase): """AnotherFakeApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.another_fake_api.AnotherFakeApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = AnotherFakeApi() - def tearDown(self): + async def asyncTearDown(self) -> None: pass - def test_call_123_test_special_tags(self): + async 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-aiohttp/test/test_any_of_color.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_any_of_color.py index 2a97cfef7526..f99dfd0020b1 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_any_of_color.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_any_of_pig.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_any_of_pig.py index 1c9efe4160f4..c3e4760182c5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_any_of_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,24 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + 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 """ - # model = petstore_api.models.any_of_pig.AnyOfPig() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AnyOfPig` + """ + model = AnyOfPig() # noqa: E501 + if include_optional: return AnyOfPig( - class_name = '', - color = '', + class_name = '', + color = '', size = 56 ) - else : + else: return AnyOfPig( class_name = '', color = '', size = 56, ) + """ def testAnyOfPig(self): """Test AnyOfPig""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_api_response.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_api_response.py index 54871268a190..9882aa1b9005 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_api_response.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,21 +26,24 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_array_of_array_of_model.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_array_of_array_of_model.py index 06b560c40021..7c0809b0b233 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_array_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,15 +26,15 @@ def setUp(self): 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( another_property = [ [ @@ -46,7 +44,7 @@ def make_instance(self, include_optional): ] ] ) - else : + else: return ArrayOfArrayOfModel( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_array_of_array_of_number_only.py index 341841c4050b..22160c2bd055 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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,9 +42,10 @@ def make_instance(self, include_optional): ] ] ) - else : + else: return ArrayOfArrayOfNumberOnly( ) + """ def testArrayOfArrayOfNumberOnly(self): """Test ArrayOfArrayOfNumberOnly""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_array_of_number_only.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_array_of_number_only.py index cf27c8a8fd72..ade32f4f8f21 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,21 +26,24 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_array_test.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_array_test.py index c26470404d7f..6858000a8b03 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_array_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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,9 +55,10 @@ def make_instance(self, include_optional): ] ] ) - else : + else: return ArrayTest( ) + """ def testArrayTest(self): """Test ArrayTest""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_basque_pig.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_basque_pig.py index 99eeb77f8073..42f62fa31115 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_basque_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,22 +26,25 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_capitalization.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_capitalization.py index 7a1b46e714c7..17b75e51e363 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_capitalization.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,24 +26,27 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_cat.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_cat.py index 03549dffe93c..58e743f44c86 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_cat.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,19 +26,22 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + 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 """ - # model = petstore_api.models.cat.Cat() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Cat` + """ + model = Cat() # noqa: E501 + if include_optional: return Cat( declawed = True ) - else : + else: return Cat( ) + """ def testCat(self): """Test Cat""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_category.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_category.py index 14848fcebcd2..2a287246f81a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_category.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_circular_all_of_ref.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_circular_all_of_ref.py index f72aa632ba8f..aaa48641b37d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_circular_all_of_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_circular_all_of_ref.py @@ -36,16 +36,10 @@ def make_instance(self, include_optional) -> CircularAllOfRef: 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-aiohttp/test/test_circular_reference_model.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_circular_reference_model.py index f734d3fc0ff6..f23f02000225 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_circular_reference_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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 @@ def make_instance(self, include_optional): nested = petstore_api.models.first_ref.FirstRef( category = '', ), ), ), ) ) - else : + else: return CircularReferenceModel( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_class_model.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_class_model.py index 9e5190a81b72..6b78a1941820 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_class_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,19 +26,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_client.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_client.py index 9a9311d6e7ed..9d109601e811 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_client.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,19 +26,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_color.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_color.py index 9a7aabfea253..21f53552b360 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_color.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_creature.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_creature.py index 66b3e088cbbf..af6b9ef7b311 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_creature.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_creature_info.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_creature_info.py index 0a85d5ffe7b2..a95dfd3d922b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_creature_info.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_danish_pig.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_danish_pig.py index 0fee5e18d9bd..bbd0ffcb5f01 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_danish_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,22 +26,25 @@ def setUp(self): 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""" 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 50e7c57bd0bf..1485ea799f79 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 @@ -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): +class TestDefaultApi(unittest.IsolatedAsyncioTestCase): """DefaultApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.default_api.DefaultApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = DefaultApi() - def tearDown(self): + async def asyncTearDown(self) -> None: pass - def test_foo_get(self): + 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_deprecated_object.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_deprecated_object.py index e4a2982cc0dd..ba3a63c719de 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_deprecated_object.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,19 +26,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_dog.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_dog.py index 797b34f2f793..d8a51df906c0 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_dog.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,19 +26,22 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + 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 """ - # model = petstore_api.models.dog.Dog() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Dog` + """ + model = Dog() # noqa: E501 + if include_optional: return Dog( breed = '' ) - else : + else: return Dog( ) + """ def testDog(self): """Test Dog""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_dummy_model.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_dummy_model.py index d6562c58bc2d..45459b666b16 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_dummy_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_enum_arrays.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_arrays.py index 52cc98601bc0..21e4cf531c4e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_arrays.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_enum_class.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_class.py index 9d7a81272cd2..92822bcdd970 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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-aiohttp/test/test_enum_string1.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_string1.py index 9dbe9eb44fb8..9cbeacbe344d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_string1.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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-aiohttp/test/test_enum_string2.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_string2.py index 4ec0ffcd86c7..409c7f257a58 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_string2.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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-aiohttp/test/test_enum_test.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_enum_test.py index 2cdb478cd154..3c57cd467c8c 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 @@ -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,23 +26,33 @@ def setUp(self): 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 + 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', + 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-aiohttp/test/test_fake_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_fake_api.py index f093a95d7d8b..dcaf7fb84f15 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 @@ -3,134 +3,270 @@ """ 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_api import FakeApi # noqa: E501 -from petstore_api.rest import ApiException -class TestFakeApi(unittest.TestCase): +class TestFakeApi(unittest.IsolatedAsyncioTestCase): """FakeApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.fake_api.FakeApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = FakeApi() + + async def asyncTearDown(self) -> None: + pass + + async def test_fake_any_type_request_body(self) -> None: + """Test case for fake_any_type_request_body - def tearDown(self): + test any type request body # noqa: E501 + """ pass - def test_fake_health_get(self): + async 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 + + async 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): + async 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): + async def test_fake_outer_boolean_serialize(self) -> None: """Test case for fake_outer_boolean_serialize """ pass - def test_fake_outer_composite_serialize(self): + async def test_fake_outer_composite_serialize(self) -> None: """Test case for fake_outer_composite_serialize """ pass - def test_fake_outer_number_serialize(self): + async def test_fake_outer_number_serialize(self) -> None: """Test case for fake_outer_number_serialize """ pass - def test_fake_outer_string_serialize(self): + async def test_fake_outer_string_serialize(self) -> None: """Test case for fake_outer_string_serialize """ pass - def test_fake_property_enum_integer_serialize(self): + async def test_fake_property_enum_integer_serialize(self) -> None: """Test case for fake_property_enum_integer_serialize """ pass - def test_test_body_with_binary(self): + async def test_fake_ref_enum_string(self) -> None: + """Test case for fake_ref_enum_string + + test ref to enum string # noqa: E501 + """ + pass + + async def test_fake_return_boolean(self) -> None: + """Test case for fake_return_boolean + + test returning boolean # noqa: E501 + """ + pass + + async def test_fake_return_byte_like_json(self) -> None: + """Test case for fake_return_byte_like_json + + test byte like json # noqa: E501 + """ + pass + + async def test_fake_return_enum(self) -> None: + """Test case for fake_return_enum + + test returning enum # noqa: E501 + """ + pass + + async def test_fake_return_enum_like_json(self) -> None: + """Test case for fake_return_enum_like_json + + test enum like json # noqa: E501 + """ + pass + + async def test_fake_return_float(self) -> None: + """Test case for fake_return_float + + test returning float # noqa: E501 + """ + pass + + async def test_fake_return_int(self) -> None: + """Test case for fake_return_int + + test returning int # noqa: E501 + """ + pass + + async 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 + + async def test_fake_return_str_like_json(self) -> None: + """Test case for fake_return_str_like_json + + test str like json # noqa: E501 + """ + pass + + async def test_fake_return_string(self) -> None: + """Test case for fake_return_string + + test returning string # noqa: E501 + """ + pass + + async def test_fake_uuid_example(self) -> None: + """Test case for fake_uuid_example + + test uuid example # noqa: E501 + """ + pass + + async def test_test_additional_properties_reference(self) -> None: + """Test case for test_additional_properties_reference + + test referenced additionalProperties # noqa: E501 + """ + pass + + async def test_test_body_with_binary(self) -> None: """Test case for test_body_with_binary """ pass - def test_test_body_with_file_schema(self): + async 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): + async def test_test_body_with_query_params(self) -> None: """Test case for test_body_with_query_params """ pass - def test_test_client_model(self): + async 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): + async def test_test_date_time_query_parameter(self) -> None: + """Test case for test_date_time_query_parameter + + """ + pass + + async 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 + + async 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_group_parameters(self): + async def test_test_error_responses_with_model(self) -> None: + """Test case for test_error_responses_with_model + + test error responses with model # noqa: E501 + """ + pass + + async 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): + async 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): + async 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 + + async 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): + async def test_test_object_for_multipart_requests(self) -> None: + """Test case for test_object_for_multipart_requests + + """ + pass + + async def test_test_query_parameter_collection_format(self) -> None: """Test case for test_query_parameter_collection_format """ pass + async def test_test_string_map_reference(self) -> None: + """Test case for test_string_map_reference + + test referenced string map # 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 77de8cafee2d..0b3fcb004d96 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 @@ -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.fake_classname_tags123_api import FakeClassnameTags123Api # noqa: E501 -from petstore_api.rest import ApiException -class TestFakeClassnameTags123Api(unittest.TestCase): +class TestFakeClassnameTags123Api(unittest.IsolatedAsyncioTestCase): """FakeClassnameTags123Api unit test stubs""" - def setUp(self): - self.api = petstore_api.api.fake_classname_tags123_api.FakeClassnameTags123Api() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = FakeClassnameTags123Api() - def tearDown(self): + async def asyncTearDown(self) -> None: pass - def test_test_classname(self): + async def test_test_classname(self) -> None: """Test case for test_classname To test class name in snake case # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_field.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_field.py index c972d91444a5..cb5e8e25dd24 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_field.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_field.py @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> Field: model = Field() # noqa: E501 if include_optional: return Field( - dummy = '' + field = '' ) else: return Field( diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_file.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_file.py index 260624562e45..0896f1869db5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_file.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,19 +26,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_file_schema_test_class.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_file_schema_test_class.py index ef13e7993368..72963bf91d52 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,24 +26,27 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_first_ref.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_first_ref.py index bcec1c0334bf..a99fc7cfc796 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_first_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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 @@ def make_instance(self, include_optional): nested = petstore_api.models.first_ref.FirstRef( category = '', ), ), ) ) - else : + else: return FirstRef( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_foo.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_foo.py index 9dcc9c2e3f4a..f92679671c7a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_foo.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,19 +26,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_foo_get_default_response.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_foo_get_default_response.py index b517c9b45837..3a024f8e6c70 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_foo_get_default_response.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,20 +26,23 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_format_test.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_format_test.py index 001020365d83..72c8965d4914 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_format_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,38 +26,41 @@ def setUp(self): 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 = 32.1, - # TODO: pydantic v2: the "float" property aliases the "float" type in the pydantic v2 generator - # float = 54.3, - double = 67.8, - string = 'a', - byte = 'YQ==', - 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 = 32.1, - byte = 'YQ==', - _date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), + var_date = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), password = '0123456789', ) + """ def testFormatTest(self): """Test FormatTest""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_has_only_read_only.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_has_only_read_only.py index 93a604cc3157..f106dda48d7e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,20 +26,23 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_health_check_result.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_health_check_result.py index e2a7fbcfbaf0..4f36cde5f8b5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_health_check_result.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,19 +26,22 @@ def setUp(self): 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""" 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 82e7781c0821..ba6b500f4eb8 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 @@ -17,16 +17,16 @@ from petstore_api.api.import_test_datetime_api import ImportTestDatetimeApi # noqa: E501 -class TestImportTestDatetimeApi(unittest.TestCase): +class TestImportTestDatetimeApi(unittest.IsolatedAsyncioTestCase): """ImportTestDatetimeApi unit test stubs""" - def setUp(self) -> None: - self.api = ImportTestDatetimeApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = ImportTestDatetimeApi() - def tearDown(self) -> None: + async def asyncTearDown(self) -> None: pass - def test_import_test_return_datetime(self) -> None: + async def test_import_test_return_datetime(self) -> None: """Test case for import_test_return_datetime test date time # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_inner_dict_with_property.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_inner_dict_with_property.py index 8a63b70d5524..1ba15fd984da 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_inner_dict_with_property.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_int_or_string.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_int_or_string.py index 0de76602cb69..41bf80d02cb5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_int_or_string.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_map_of_array_of_model.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_map_of_array_of_model.py index 31ad486f5c03..2f88aa7935ad 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_map_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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 @@ def make_instance(self, include_optional): ] } ) - else : + else: return MapOfArrayOfModel( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_map_test.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_map_test.py index 2618f59446fd..8aedbfa8f665 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_map_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,32 +26,35 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_mixed_properties_and_additional_properties_class.py index ec7666d4b0c4..12a96998a561 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,25 +26,28 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_model200_response.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_model200_response.py index 343e3109ae08..f5e65f1aca4e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_model200_response.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,20 +26,23 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_model_return.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_model_return.py index cd4afbbf9732..e011892fb0b3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_model_return.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,19 +26,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_name.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_name.py index a5114ce3a371..be7ddc8461d1 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,23 +26,26 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_nullable_class.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_nullable_class.py index a1ccadef2413..b1170db23c4d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_nullable_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,44 +26,47 @@ def setUp(self): 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'), + 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'), 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, ) + """ def testNullableClass(self): """Test NullableClass""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_nullable_property.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_nullable_property.py index 34129457b1d7..aa34b84e7973 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_nullable_property.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_number_only.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_number_only.py index 0d3a7bfcc63d..cfc8c5c778c4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,19 +26,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_object_to_test_additional_properties.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_object_to_test_additional_properties.py index f1f354cad251..d080b21afb32 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_object_to_test_additional_properties.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_object_with_deprecated_fields.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_object_with_deprecated_fields.py index f51638ec7b6f..5f04c63a3cb3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_object_with_deprecated_fields.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,25 +26,28 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_one_of_enum_string.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_one_of_enum_string.py index ed959c1479c2..3db614a16caf 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_one_of_enum_string.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_order.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_order.py index feea3c6f5646..3334ed8f949a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_order.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,24 +26,27 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_composite.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_composite.py index 9fb62a1397da..7df32d8c6725 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_composite.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,21 +26,24 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_enum.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_enum.py index a925744023d6..5da04a9a45c0 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_enum.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_enum_default_value.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_enum_default_value.py index f8fba3bd79ad..df6499565fdb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_enum_default_value.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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-aiohttp/test/test_outer_enum_integer.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_enum_integer.py index ce1e47c61b14..7b89b806ba24 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_enum_integer.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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-aiohttp/test/test_outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_enum_integer_default_value.py index 3fed147cc50c..532616fdee1f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_object_with_enum_property.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_object_with_enum_property.py index 35258d5d74ac..27e518b00593 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_outer_object_with_enum_property.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_parent.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_parent.py index 2a74505f08a1..ea206970c9cf 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_parent.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_parent_with_optional_dict.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_parent_with_optional_dict.py index 25b769e3d390..2c668a7047a8 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_parent_with_optional_dict.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_pet.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_pet.py index 1b98295f4d11..f89e6cdf4b40 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_pet.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,36 +26,39 @@ def setUp(self): 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""" 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 77665df879f1..35c72b2892bc 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 @@ -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): +class TestPetApi(unittest.IsolatedAsyncioTestCase): """PetApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.pet_api.PetApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = PetApi() - def tearDown(self): + async def asyncTearDown(self) -> None: pass - def test_add_pet(self): + async 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): + async def test_delete_pet(self) -> None: """Test case for delete_pet Deletes a pet # noqa: E501 """ pass - def test_find_pets_by_status(self): + async 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): + async 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): + async 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): + async 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): + async 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): + async 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): + async 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-aiohttp/test/test_pig.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_pig.py index 38389bae3ce8..cd3f112aabc5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,24 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + 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 """ - # model = petstore_api.models.pig.Pig() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Pig` + """ + model = Pig() # noqa: E501 + if include_optional: return Pig( - class_name = '', - color = '', + class_name = '', + color = '', size = 56 ) - else : + else: return Pig( class_name = '', color = '', size = 56, ) + """ def testPig(self): """Test Pig""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_property_name_collision.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_property_name_collision.py index 17d9f52bf1da..f9c8d8a77213 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_property_name_collision.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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( - type = '', - type = '', + type = '', + type = '', type_ = '' ) - else : + else: return PropertyNameCollision( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_read_only_first.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_read_only_first.py index a8b070b3631a..1026a73205d4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_read_only_first.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,20 +26,23 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_second_circular_all_of_ref.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_second_circular_all_of_ref.py index 3b9a26f72d82..c1ef0d1b7db1 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_second_circular_all_of_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_second_circular_all_of_ref.py @@ -36,13 +36,10 @@ def make_instance(self, include_optional) -> SecondCircularAllOfRef: 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-aiohttp/test/test_second_ref.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_second_ref.py index 782892fd4e17..44194f94544f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_second_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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 @@ def make_instance(self, include_optional): self_ref = petstore_api.models.second_ref.SecondRef( category = '', ), ), ) ) - else : + else: return SecondRef( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_self_reference_model.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_self_reference_model.py index b3dd7ada2b2a..8c23008b26ed 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_self_reference_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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 @@ def make_instance(self, include_optional): nested = petstore_api.models.dummy_model.Dummy-Model( category = '', ), ), ) ) - else : + else: return SelfReferenceModel( ) """ diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_single_ref_type.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_single_ref_type.py index 31fbb0960ffe..f5642b8376b0 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_single_ref_type.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_special_character_enum.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_special_character_enum.py index 028f55599e49..ee5baab13095 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_special_character_enum.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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-aiohttp/test/test_special_model_name.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_special_model_name.py index 3553b6c41be3..12ec90a9067f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_special_model_name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,19 +26,22 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_special_name.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_special_name.py index 37a7235a8c39..afaf0996b74c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_special_name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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', ), + name = 'default-name', ), var_schema = 'available' ) - else : + else: return SpecialName( ) """ 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 81848d24a67e..8c2ba9c1e5c8 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 @@ -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): +class TestStoreApi(unittest.IsolatedAsyncioTestCase): """StoreApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.store_api.StoreApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = StoreApi() - def tearDown(self): + async def asyncTearDown(self) -> None: pass - def test_delete_order(self): + async def test_delete_order(self) -> None: """Test case for delete_order Delete purchase order by ID # noqa: E501 """ pass - def test_get_inventory(self): + async 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): + async 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): + async 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-aiohttp/test/test_tag.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_tag.py index e75884bc136e..d5ce3fb8a0cf 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_tag.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,20 +26,23 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_tiger.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_tiger.py index 83c91cea1a0d..7aab61a46066 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_tiger.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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 @@ def setUp(self): 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-aiohttp/test/test_user.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_user.py index b19c3a7443f5..a1ce46e87a19 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_user.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,26 +26,29 @@ def setUp(self): 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""" 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 6df730fba2b1..769d7e00f8e0 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 @@ -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): +class TestUserApi(unittest.IsolatedAsyncioTestCase): """UserApi unit test stubs""" - def setUp(self): - self.api = petstore_api.api.user_api.UserApi() # noqa: E501 + async def asyncSetUp(self) -> None: + self.api = UserApi() - def tearDown(self): + async def asyncTearDown(self) -> None: pass - def test_create_user(self): + async def test_create_user(self) -> None: """Test case for create_user Create user # noqa: E501 """ pass - def test_create_users_with_array_input(self): + async 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): + async 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): + async def test_delete_user(self) -> None: """Test case for delete_user Delete user # noqa: E501 """ pass - def test_get_user_by_name(self): + async 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): + async def test_login_user(self) -> None: """Test case for login_user Logs user into the system # noqa: E501 """ pass - def test_logout_user(self): + async 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): + async 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-aiohttp/test/test_with_nested_one_of.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_with_nested_one_of.py index a0123fd14c42..43c4a69a29bb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_with_nested_one_of.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/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,20 +26,24 @@ def setUp(self): 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""" diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/tests/test_api_client.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/tests/test_api_client.py index d3daa10d51ce..4e33d39d0d45 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/tests/test_api_client.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/tests/test_api_client.py @@ -3,17 +3,12 @@ # flake8: noqa import unittest -import weakref -from tests.util import async_test import petstore_api -class TestApiClient(unittest.TestCase): - - @async_test +class TestApiClient(unittest.IsolatedAsyncioTestCase): async def test_context_manager_closes_client(self): - async with petstore_api.ApiClient() as client: # pool_manager self.assertFalse(client.rest_client.pool_manager.closed) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/tests/test_pet_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/tests/test_pet_api.py index 25064d4a9558..71e09a946e3a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/tests/test_pet_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/tests/test_pet_api.py @@ -12,24 +12,20 @@ import os import unittest import asyncio -import pytest import petstore_api from petstore_api import Configuration from petstore_api.rest import ApiException -from .util import id_gen, async_test +from .util import id_gen import json -import urllib3 - HOST = 'http://localhost:80/v2' -class TestPetApiTests(unittest.TestCase): - - def setUp(self): +class TestPetApiTests(unittest.IsolatedAsyncioTestCase): + async def asyncSetUp(self): config = Configuration() config.host = HOST @@ -38,6 +34,9 @@ def setUp(self): self.setUpModels() self.setUpFiles() + async def asyncTearDown(self): + await self.api_client.close() + def setUpModels(self): self.category = petstore_api.Category(id=id_gen(), name="dog") #self.category.id = id_gen() @@ -56,17 +55,16 @@ def setUpFiles(self): self.test_file_dir = os.path.realpath(self.test_file_dir) self.foo = os.path.join(self.test_file_dir, "foo.png") - def test_separate_default_client_instances(self): + async def test_separate_default_client_instances(self): pet_api = petstore_api.PetApi() pet_api2 = petstore_api.PetApi() self.assertEqual(id(pet_api.api_client), id(pet_api2.api_client)) - def test_separate_default_config_instances(self): + async def test_separate_default_config_instances(self): pet_api = petstore_api.PetApi() pet_api2 = petstore_api.PetApi() self.assertEqual(id(pet_api.api_client.configuration), id(pet_api2.api_client.configuration)) - @async_test async def test_async_with_result(self): await self.pet_api.add_pet(self.pet) @@ -83,7 +81,6 @@ async def test_async_with_result(self): self.assertEqual(response.id, self.pet.id) self.assertEqual(len(responses), 2) - @async_test async def test_exception(self): await self.pet_api.add_pet(self.pet) @@ -95,7 +92,6 @@ async def test_exception(self): self.assertIsInstance(exception, ApiException) self.assertEqual(exception.status, 404) - @async_test async def test_add_pet_and_get_pet_by_id(self): await self.pet_api.add_pet(self.pet) @@ -105,7 +101,6 @@ async def test_add_pet_and_get_pet_by_id(self): self.assertIsNotNone(fetched.category) self.assertEqual(self.pet.category.name, fetched.category.name) - @async_test async def test_add_pet_and_get_pet_by_id_with_http_info(self): await self.pet_api.add_pet(self.pet) @@ -115,7 +110,6 @@ async def test_add_pet_and_get_pet_by_id_with_http_info(self): self.assertIsNotNone(fetched.data.category) self.assertEqual(self.pet.category.name, fetched.data.category.name) - @async_test async def test_update_pet(self): self.pet.name = "hello kity with updated" await self.pet_api.update_pet(self.pet) @@ -127,7 +121,6 @@ async def test_update_pet(self): self.assertIsNotNone(fetched.category) self.assertEqual(fetched.category.name, self.pet.category.name) - @async_test async def test_find_pets_by_status(self): await self.pet_api.add_pet(self.pet) pets = await self.pet_api.find_pets_by_status(status=[self.pet.status]) @@ -136,7 +129,6 @@ async def test_find_pets_by_status(self): list(map(lambda x: getattr(x, 'id'), pets)) ) - @async_test async def test_find_pets_by_tags(self): await self.pet_api.add_pet(self.pet) pets = await self.pet_api.find_pets_by_tags(tags=[self.tag.name]) @@ -145,7 +137,6 @@ async def test_find_pets_by_tags(self): list(map(lambda x: getattr(x, 'id'), pets)) ) - @async_test async def test_update_pet_with_form(self): await self.pet_api.add_pet(self.pet) @@ -158,7 +149,6 @@ async def test_update_pet_with_form(self): self.assertEqual(name, fetched.name) self.assertEqual(status, fetched.status) - @async_test async def test_upload_file(self): # upload file with form parameter try: @@ -177,7 +167,6 @@ async def test_upload_file(self): except ApiException as e: self.fail("upload_file() raised {0} unexpectedly".format(type(e))) - @async_test async def test_delete_pet(self): await self.pet_api.add_pet(self.pet) await self.pet_api.delete_pet(pet_id=self.pet.id, api_key="special-key") @@ -188,7 +177,6 @@ async def test_delete_pet(self): except ApiException as e: self.assertEqual(404, e.status) - @async_test async def test_proxy(self): config = Configuration() # set not-existent proxy and catch an error to verify that diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/tests/util.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/tests/util.py index 4ab082872660..113d7dcc5478 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/tests/util.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/tests/util.py @@ -1,19 +1,8 @@ # flake8: noqa -import asyncio import random def id_gen(bits=32): """ Returns a n-bit randomly generated int """ return int(random.getrandbits(bits)) - - -def async_test(f): - def wrapper(*args, **kwargs): - # coro = asyncio.coroutine(f) - coro = f - future = coro(*args, **kwargs) - loop = asyncio.get_event_loop() - loop.run_until_complete(future) - return wrapper diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/.github/workflows/python.yml b/samples/openapi3/client/petstore/python-pydantic-v1/.github/workflows/python.yml index fed030f265ed..a351cfc7fd74 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/.github/workflows/python.yml +++ b/samples/openapi3/client/petstore/python-pydantic-v1/.github/workflows/python.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/pyproject.toml b/samples/openapi3/client/petstore/python-pydantic-v1/pyproject.toml index e3a793099344..d67ebb4ca8e2 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/pyproject.toml +++ b/samples/openapi3/client/petstore/python-pydantic-v1/pyproject.toml @@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"] include = ["petstore_api/py.typed"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" diff --git a/samples/openapi3/client/petstore/python/.github/workflows/python.yml b/samples/openapi3/client/petstore/python/.github/workflows/python.yml index fed030f265ed..a351cfc7fd74 100644 --- a/samples/openapi3/client/petstore/python/.github/workflows/python.yml +++ b/samples/openapi3/client/petstore/python/.github/workflows/python.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/samples/openapi3/client/petstore/python/pyproject.toml b/samples/openapi3/client/petstore/python/pyproject.toml index e416a2dcbdab..9835c5efb4c2 100644 --- a/samples/openapi3/client/petstore/python/pyproject.toml +++ b/samples/openapi3/client/petstore/python/pyproject.toml @@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"] include = ["petstore_api/py.typed"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" @@ -24,7 +24,7 @@ pytest = ">=7.2.1" tox = ">=3.9.0" flake8 = ">=4.0.0" types-python-dateutil = ">=2.8.19.14" -mypy = "1.4.1" +mypy = ">=1.5" [build-system]