File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -892,6 +892,13 @@ def test_invalid_pattern(self):
892
892
with self .assertRaises (SchemaError ):
893
893
self .Validator .check_schema ({"pattern" : "\q" })
894
894
895
+ def test_minItems_invalid_string (self ):
896
+ with self .assertRaises (SchemaError ):
897
+ # needs to be an integer
898
+ self .Validator .check_schema ({"minItems" : "1" })
899
+
900
+
901
+ class InvalidRegexMixin (object ):
895
902
def test_invalid_patternProperty (self ):
896
903
with self .assertRaises (SchemaError ):
897
904
self .Validator .check_schema (
@@ -903,6 +910,14 @@ def test_minItems_invalid_string(self):
903
910
self .Validator .check_schema ({"minItems" : "1" })
904
911
905
912
913
+ class TestDraft6InvalidRegex (InvalidRegexMixin , object ):
914
+ Validator = validators .Draft6Validator
915
+
916
+
917
+ class TestDraft7InvalidRegex (InvalidRegexMixin , object ):
918
+ Validator = validators .Draft7Validator
919
+
920
+
906
921
class ValidatorTestMixin (MetaSchemaTestsMixin , object ):
907
922
def test_valid_instances_are_valid (self ):
908
923
schema , instance = self .valid
You can’t perform that action at this time.
0 commit comments