Fixed Cerberus canary unit test

Apparently it's no longer possible for Cerberus to validate its own schemas.
This commit is contained in:
Sybren A. Stüvel 2018-07-13 12:02:40 +02:00
parent c607eaf23d
commit aaf452e18b

View File

@ -15,6 +15,8 @@ class CerberusCanaryTest(unittest.TestCase):
groups_schema = {'name': {'type': 'string', 'required': True}}
# On error, validate_schema() raises ValidationError
if hasattr(validator, 'validate_schema'):
# It was removed in Cerberus 1.0 (or thereabouts)
validator.validate_schema(groups_schema)
# On error, validate() returns False