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 @@ -1107,6 +1107,13 @@ def test_invalid_pattern(self):
1107
1107
with self .assertRaises (SchemaError ):
1108
1108
self .Validator .check_schema ({"pattern" : "\q" })
1109
1109
1110
+ def test_minItems_invalid_string (self ):
1111
+ with self .assertRaises (SchemaError ):
1112
+ # needs to be an integer
1113
+ self .Validator .check_schema ({"minItems" : "1" })
1114
+
1115
+
1116
+ class InvalidRegexMixin (object ):
1110
1117
def test_invalid_patternProperty (self ):
1111
1118
with self .assertRaises (SchemaError ):
1112
1119
self .Validator .check_schema (
@@ -1134,6 +1141,14 @@ def test_enum_allows_non_unique_items(self):
1134
1141
self .Validator .check_schema ({"enum" : [12 , 12 ]})
1135
1142
1136
1143
1144
+ class TestDraft6InvalidRegex (InvalidRegexMixin , object ):
1145
+ Validator = validators .Draft6Validator
1146
+
1147
+
1148
+ class TestDraft7InvalidRegex (InvalidRegexMixin , object ):
1149
+ Validator = validators .Draft7Validator
1150
+
1151
+
1137
1152
class ValidatorTestMixin (MetaSchemaTestsMixin , object ):
1138
1153
def test_valid_instances_are_valid (self ):
1139
1154
schema , instance = self .valid
You can’t perform that action at this time.
0 commit comments