Tests: Support jsonschema 4.21

This fixes unit test compatibility with
jsonschema 4.21 while maintaining compat
with jsonschema 3.2.

Change-Id: If9b8b4ccc805c8086c180e881b0ddd712289ad13
This commit is contained in:
Eric Harney 2024-02-20 09:00:56 -05:00
parent 7245ec027b
commit 105728c2ab

View File

@ -303,8 +303,10 @@ class StringLengthTestCase(APIValidationTestCase):
req=FakeRequest()))
def test_validate_string_length_fails(self):
# checks for jsonschema output from 3.2.x and 4.21.x
detail = ("Invalid input for field/attribute foo. Value: ."
" '' is too short")
" '' "
"(is too short|should be non-empty)")
self.check_validation_error(self.post, body={'foo': ''},
expected_detail=detail)