File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313from flask_smorest import Api , Blueprint , Page
1414from flask_smorest .fields import Upload
15+ from flask_smorest .compat import MARSHMALLOW_VERSION_MAJOR
16+
1517
1618from .utils import build_ref
1719
@@ -289,6 +291,9 @@ def test_blueprint_arguments_files_multipart(
289291 client = app .test_client ()
290292
291293 class MultipartSchema (ma .Schema ):
294+ if MARSHMALLOW_VERSION_MAJOR < 3 :
295+ class Meta :
296+ strict = True
292297 file_1 = Upload ()
293298 file_2 = Upload ()
294299
@@ -747,6 +752,9 @@ def test_blueprint_doc_merged_after_prepare_doc(self, app):
747752 'content' : {'application/json' : {'example' : {'test' : 123 }}}}
748753
749754 class ItemSchema (ma .Schema ):
755+ if MARSHMALLOW_VERSION_MAJOR < 3 :
756+ class Meta :
757+ strict = True
750758 test = ma .fields .Int ()
751759
752760 @blp .route ('/' )
@@ -778,6 +786,9 @@ def test_blueprint_response_status_code_cast_to_string(
778786 doc_desc = {'description' : 'Description' }
779787
780788 class ItemSchema (ma .Schema ):
789+ if MARSHMALLOW_VERSION_MAJOR < 3 :
790+ class Meta :
791+ strict = True
781792 test = ma .fields .Int ()
782793
783794 @blp .route ('/' )
You can’t perform that action at this time.
0 commit comments