Update python test (#426)

* update python test folders

* update python template

* update python samples

* fix python comment too long

* update ruby test case
This commit is contained in:
William Cheng
2018-05-12 09:54:19 +08:00
committed by GitHub
parent 4b7a583b33
commit 2ed3d8cc86
279 changed files with 515 additions and 2144 deletions

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""
@@ -53,6 +52,12 @@ class TestFakeApi(unittest.TestCase):
"""
pass
def test_test_body_with_query_params(self):
"""Test case for test_body_with_query_params
"""
pass
def test_test_client_model(self):
"""Test case for test_client_model

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,40 +0,0 @@
# coding: utf-8
"""
Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import petstore_api
from petstore_api.models.model_200_response import Model200Response # noqa: E501
from petstore_api.rest import ApiException
class TestModel200Response(unittest.TestCase):
"""Model200Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testModel200Response(self):
"""Test Model200Response"""
# FIXME: construct object with mandatory attributes with example values
# model = petstore_api.models.model_200_response.Model200Response() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,40 +0,0 @@
# coding: utf-8
"""
Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import petstore_api
from petstore_api.models.outer_boolean import OuterBoolean # noqa: E501
from petstore_api.rest import ApiException
class TestOuterBoolean(unittest.TestCase):
"""OuterBoolean unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testOuterBoolean(self):
"""Test OuterBoolean"""
# FIXME: construct object with mandatory attributes with example values
# model = petstore_api.models.outer_boolean.OuterBoolean() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,40 +0,0 @@
# coding: utf-8
"""
Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import petstore_api
from petstore_api.models.outer_number import OuterNumber # noqa: E501
from petstore_api.rest import ApiException
class TestOuterNumber(unittest.TestCase):
"""OuterNumber unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testOuterNumber(self):
"""Test OuterNumber"""
# FIXME: construct object with mandatory attributes with example values
# model = petstore_api.models.outer_number.OuterNumber() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()

View File

@@ -1,40 +0,0 @@
# coding: utf-8
"""
Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import petstore_api
from petstore_api.models.outer_string import OuterString # noqa: E501
from petstore_api.rest import ApiException
class TestOuterString(unittest.TestCase):
"""OuterString unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testOuterString(self):
"""Test OuterString"""
# FIXME: construct object with mandatory attributes with example values
# model = petstore_api.models.outer_string.OuterString() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""

View File

@@ -1,13 +1,12 @@
# coding: utf-8
"""
Swagger Petstore
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
Generated by: https://openapi-generator.tech
"""