Fix/remove support python2 option in flask aiohttp generators (#13585)

* fix: remove option supportPython2.
[python-flask][python-aiohttp][python-blueplanet]

* fix: update samples

* test only python servers

* fix(tests): downgrade pytest version to ensure compatibility with python3.6 [python-flask][python-aiohttp]

* Revert "fix(tests): downgrade pytest version to ensure compatibility with python3.6 [python-flask][python-aiohttp]"

This reverts commit 9f47db2f87.

* test in circlei

* run commands directly

* test in node 1

* update makefile

* fix Makefile

* fix test

* revert some changes, remove python server tests from travis

Co-authored-by: Kevin Bannier <kevinbannier1@gmail.com>
This commit is contained in:
William Cheng
2022-10-04 15:24:26 +08:00
committed by GitHub
parent 57f5cc4000
commit 085e1e58e5
47 changed files with 83 additions and 185 deletions

View File

@@ -14,7 +14,7 @@ from openapi_server.test import BaseTestCase
class TestPetController(BaseTestCase):
"""PetController integration test stubs"""
@unittest.skip("Connexion does not support multiple consummes. See https://github.com/zalando/connexion/pull/760")
@unittest.skip("Connexion does not support multiple consumes. See https://github.com/zalando/connexion/pull/760")
def test_add_pet(self):
"""Test case for add_pet
@@ -89,7 +89,7 @@ class TestPetController(BaseTestCase):
Finds Pets by tags
"""
query_string = [('tags', 'tags_example')]
query_string = [('tags', ['tags_example'])]
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer special-key',
@@ -118,7 +118,7 @@ class TestPetController(BaseTestCase):
self.assert200(response,
'Response body is : ' + response.data.decode('utf-8'))
@unittest.skip("Connexion does not support multiple consummes. See https://github.com/zalando/connexion/pull/760")
@unittest.skip("Connexion does not support multiple consumes. See https://github.com/zalando/connexion/pull/760")
def test_update_pet(self):
"""Test case for update_pet
@@ -187,7 +187,7 @@ class TestPetController(BaseTestCase):
'Authorization': 'Bearer special-key',
}
data = dict(additional_metadata='additional_metadata_example',
file=(BytesIO(b'some file data'), 'file.txt'))
file='/path/to/file')
response = self.client.open(
'/v2/pet/{pet_id}/uploadImage'.format(pet_id=56),
method='POST',

View File

@@ -52,7 +52,7 @@ class TestStoreController(BaseTestCase):
'Accept': 'application/json',
}
response = self.client.open(
'/v2/store/order/{order_id}'.format(order_id=5),
'/v2/store/order/{order_id}'.format(order_id=1),
method='GET',
headers=headers)
self.assert200(response,
@@ -64,7 +64,7 @@ class TestStoreController(BaseTestCase):
Place an order for a pet
"""
body = {}
body = openapi_server.Order()
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json',

View File

@@ -19,7 +19,7 @@ class TestUserController(BaseTestCase):
Create user
"""
body = {}
body = openapi_server.User()
headers = {
'Content-Type': 'application/json',
}
@@ -38,7 +38,7 @@ class TestUserController(BaseTestCase):
Creates list of users with given input array
"""
body = [{}]
body = [openapi_server.User()]
headers = {
'Content-Type': 'application/json',
}
@@ -57,7 +57,7 @@ class TestUserController(BaseTestCase):
Creates list of users with given input array
"""
body = [{}]
body = [openapi_server.User()]
headers = {
'Content-Type': 'application/json',
}
@@ -137,7 +137,7 @@ class TestUserController(BaseTestCase):
Updated user
"""
body = {}
body = openapi_server.User()
headers = {
'Content-Type': 'application/json',
}