mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-02-24 00:59:59 -05:00
use main flasgger lib and workaround a know and unsolved problem
This commit is contained in:
parent
8b0c7717e3
commit
2f527a7a13
@ -8,5 +8,5 @@ Flask-Cors==3.0.10
|
|||||||
Cerberus==1.3.4
|
Cerberus==1.3.4
|
||||||
Flask-Testing==0.8.1
|
Flask-Testing==0.8.1
|
||||||
blinker==1.4
|
blinker==1.4
|
||||||
iknl-flasgger==0.9.2.post1
|
flasgger==0.9.5
|
||||||
Flask-Assets==2.0
|
Flask-Assets==2.0
|
@ -145,6 +145,7 @@ class Mat2APITestCase(unittest.TestCase):
|
|||||||
'FcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="}',
|
'FcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="}',
|
||||||
headers={'content-type': 'application/json'}
|
headers={'content-type': 'application/json'}
|
||||||
)
|
)
|
||||||
|
print(request.get_json())
|
||||||
self.assertEqual(request.status_code, 201)
|
self.assertEqual(request.status_code, 201)
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
|
|
||||||
@ -196,8 +197,8 @@ class Mat2APITestCase(unittest.TestCase):
|
|||||||
'FcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="}',
|
'FcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="}',
|
||||||
headers={'content-type': 'application/json'}
|
headers={'content-type': 'application/json'}
|
||||||
)
|
)
|
||||||
self.assertEqual(request.status_code, 201)
|
|
||||||
upload_one = request.get_json()
|
upload_one = request.get_json()
|
||||||
|
self.assertEqual(request.status_code, 201)
|
||||||
|
|
||||||
request = self.app.post('/api/upload',
|
request = self.app.post('/api/upload',
|
||||||
data='{"file_name": "test_name_two.jpg", '
|
data='{"file_name": "test_name_two.jpg", '
|
||||||
@ -460,6 +461,8 @@ class Mat2APITestCase(unittest.TestCase):
|
|||||||
|
|
||||||
def test_valid_opena_api_spec(self):
|
def test_valid_opena_api_spec(self):
|
||||||
spec = self.app.get('apispec_1.json').get_json()
|
spec = self.app.get('apispec_1.json').get_json()
|
||||||
|
# Test workaround due to https://github.com/flasgger/flasgger/issues/374
|
||||||
|
del spec['definitions']
|
||||||
validate_spec(spec)
|
validate_spec(spec)
|
||||||
|
|
||||||
def test_remove_metadata(self):
|
def test_remove_metadata(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user