Skip to content

Commit 4123b3d

Browse files
committed
Fix a test
1 parent fe9347f commit 4123b3d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_from_schema.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,20 +364,22 @@ def test_cannot_generate_for_empty_test_suite_schema(name):
364364
# merged or otherwise handled correctly, with the exception of the key "ab" which
365365
# would have to be both an integer and a string (and is thus disallowed).
366366
OVERLAPPING_PATTERNS_SCHEMA = {
367-
"type": "string",
367+
"type": "object",
368368
"patternProperties": {
369369
r"\A[ab]{1,2}\Z": {},
370370
r"\Aa[ab]\Z": {"type": "integer"},
371371
r"\A[ab]b\Z": {"type": "string"},
372372
},
373373
"additionalProperties": False,
374-
"minimumProperties": 1,
374+
"minProperties": 1,
375375
}
376376

377377

378378
@given(from_schema(OVERLAPPING_PATTERNS_SCHEMA))
379379
def test_handles_overlapping_patternproperties(value):
380380
jsonschema.validate(value, OVERLAPPING_PATTERNS_SCHEMA)
381+
assert isinstance(value, dict)
382+
assert len(value) >= 1
381383
assert "ab" not in value
382384

383385

0 commit comments

Comments
 (0)