diff options
| -rw-r--r-- | requirements.txt | 2 | ||||
| -rw-r--r-- | test/test_api.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/requirements.txt b/requirements.txt index 0571b19..982fdb1 100644 --- a/requirements.txt +++ b/requirements.txt | |||
| @@ -8,5 +8,5 @@ Flask-Cors==3.0.10 | |||
| 8 | Cerberus==1.3.4 | 8 | Cerberus==1.3.4 |
| 9 | Flask-Testing==0.8.1 | 9 | Flask-Testing==0.8.1 |
| 10 | blinker==1.4 | 10 | blinker==1.4 |
| 11 | iknl-flasgger==0.9.2.post1 | 11 | flasgger==0.9.5 |
| 12 | Flask-Assets==2.0 \ No newline at end of file | 12 | Flask-Assets==2.0 \ No newline at end of file |
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): |
