Skip to content

Commit 52fdebe

Browse files
committed
Add test for unevaluatedProperties
1 parent 8dc2889 commit 52fdebe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

jsonschema/tests/test_validators.py

+8
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,14 @@ def test_unevaluated_properties_on_invalid_type(self):
742742
message = self.message_for(instance="foo", schema=schema)
743743
self.assertEqual(message, "'foo' is not of type 'object'")
744744

745+
def test_unevaluated_properties_with_additional_properties(self):
746+
schema = {
747+
"additionalProperties": {"type": "string"},
748+
"unevaluatedProperties": False,
749+
}
750+
validator = validators._LATEST_VERSION(schema)
751+
validator.validate(instance={"foo": "foo"})
752+
745753
def test_single_item(self):
746754
schema = {"prefixItems": [{}], "items": False}
747755
message = self.message_for(

0 commit comments

Comments
 (0)