summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_api.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_api.py b/test/test_api.py
index 427a1f1..3cc44a6 100644
--- a/test/test_api.py
+++ b/test/test_api.py
@@ -145,6 +145,7 @@ class Mat2APITestCase(unittest.TestCase):
145 'FcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="}', 145 'FcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="}',
146 headers={'content-type': 'application/json'} 146 headers={'content-type': 'application/json'}
147 ) 147 )
148 print(request.get_json())
148 self.assertEqual(request.status_code, 201) 149 self.assertEqual(request.status_code, 201)
149 data = request.get_json() 150 data = request.get_json()
150 151
@@ -196,8 +197,8 @@ class Mat2APITestCase(unittest.TestCase):
196 'FcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="}', 197 'FcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="}',
197 headers={'content-type': 'application/json'} 198 headers={'content-type': 'application/json'}
198 ) 199 )
199 self.assertEqual(request.status_code, 201)
200 upload_one = request.get_json() 200 upload_one = request.get_json()
201 self.assertEqual(request.status_code, 201)
201 202
202 request = self.app.post('/api/upload', 203 request = self.app.post('/api/upload',
203 data='{"file_name": "test_name_two.jpg", ' 204 data='{"file_name": "test_name_two.jpg", '
@@ -460,6 +461,8 @@ class Mat2APITestCase(unittest.TestCase):
460 461
461 def test_valid_opena_api_spec(self): 462 def test_valid_opena_api_spec(self):
462 spec = self.app.get('apispec_1.json').get_json() 463 spec = self.app.get('apispec_1.json').get_json()
464 # Test workaround due to https://github.com/flasgger/flasgger/issues/374
465 del spec['definitions']
463 validate_spec(spec) 466 validate_spec(spec)
464 467
465 def test_remove_metadata(self): 468 def test_remove_metadata(self):