diff options
| author | jf | 2023-06-04 16:44:53 +0200 |
|---|---|---|
| committer | jf | 2023-06-04 16:44:53 +0200 |
| commit | ee0727bfb309a307fc8e115f967d4aced2816cd9 (patch) | |
| tree | fa59ed0f79c35e225042304b977427b480441694 | |
| parent | 42de0752a17a01c661e8099e51f2a939db747451 (diff) | |
updated flask and flasgger
| -rw-r--r-- | main.py | 3 | ||||
| -rw-r--r-- | requirements.txt | 2 | ||||
| -rw-r--r-- | test/test_api.py | 1 |
3 files changed, 3 insertions, 3 deletions
| @@ -34,7 +34,8 @@ def create_app(test_config=None): | |||
| 34 | 34 | ||
| 35 | # Restful API hookup | 35 | # Restful API hookup |
| 36 | app.register_blueprint(rest_api.api_bp) | 36 | app.register_blueprint(rest_api.api_bp) |
| 37 | app.json_encoder = LazyJSONEncoder | 37 | app.json_provider_class = LazyJSONEncoder |
| 38 | app.json = LazyJSONEncoder(app) | ||
| 38 | 39 | ||
| 39 | dirname = os.path.dirname(__file__) | 40 | dirname = os.path.dirname(__file__) |
| 40 | with open(os.path.join(dirname, 'matweb/oas/components.yml')) as file: | 41 | with open(os.path.join(dirname, 'matweb/oas/components.yml')) as file: |
diff --git a/requirements.txt b/requirements.txt index e540321..a9a52fb 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.6.2 | 10 | blinker==1.6.2 |
| 11 | flasgger==0.9.5 | 11 | flasgger==0.9.7b2 |
| 12 | Flask-Assets==2.0 | 12 | Flask-Assets==2.0 |
diff --git a/test/test_api.py b/test/test_api.py index e83021a..2f52279 100644 --- a/test/test_api.py +++ b/test/test_api.py | |||
| @@ -474,7 +474,6 @@ class Mat2APITestCase(unittest.TestCase): | |||
| 474 | def test_valid_opena_api_spec(self): | 474 | def test_valid_opena_api_spec(self): |
| 475 | spec = self.app.get('apispec_1.json').get_json() | 475 | spec = self.app.get('apispec_1.json').get_json() |
| 476 | # Test workaround due to https://github.com/flasgger/flasgger/issues/374 | 476 | # Test workaround due to https://github.com/flasgger/flasgger/issues/374 |
| 477 | del spec['definitions'] | ||
| 478 | validate_spec(spec) | 477 | validate_spec(spec) |
| 479 | 478 | ||
| 480 | def test_remove_metadata(self): | 479 | def test_remove_metadata(self): |
