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

@@ -5,7 +5,7 @@
"""
Run the tests.
$ pip install nose (optional)
$ cd SwaggerPetstore-python
$ cd OpenAPIetstore-python
$ nosetests -v
"""

View File

@@ -5,7 +5,7 @@
"""
Run the tests.
$ pip install nose (optional)
$ cd SwaggerPetstore-python
$ cd OpenAPIPetstore-python
$ nosetests -v
"""
import os

View File

@@ -68,7 +68,7 @@ class PetApiTests(unittest.TestCase):
self.category.name = "dog"
self.tag = petstore_api.Tag()
self.tag.id = id_gen()
self.tag.name = "swagger-codegen-python-pet-tag"
self.tag.name = "python-pet-tag"
self.pet = petstore_api.Pet(name="hello kity", photo_urls=["http://foo.bar.com/1", "http://foo.bar.com/2"])
self.pet.id = id_gen()
self.pet.status = "sold"
@@ -108,13 +108,13 @@ class PetApiTests(unittest.TestCase):
body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)),
headers={'Content-Type': 'application/json',
'Authorization': 'Bearer ',
'User-Agent': 'Swagger-Codegen/1.0.0/python'},
'User-Agent': 'OpenAPI-Generator/1.0.0/python'},
preload_content=True, timeout=TimeoutWithEqual(total=5))
mock_pool.expect_request('POST', 'http://localhost/v2/pet',
body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)),
headers={'Content-Type': 'application/json',
'Authorization': 'Bearer ',
'User-Agent': 'Swagger-Codegen/1.0.0/python'},
'User-Agent': 'OpenAPI-Generator/1.0.0/python'},
preload_content=True, timeout=TimeoutWithEqual(connect=1, read=2))
self.pet_api.add_pet(self.pet, _request_timeout=5)

View File

@@ -5,7 +5,7 @@
"""
Run the tests.
$ pip install nose (optional)
$ cd SwaggerPetstore-python
$ cd OpenAP/Petstore-python
$ nosetests -v
"""