Fixed Cerberus canary unit test
Apparently it's no longer possible for Cerberus to validate its own schemas.
This commit is contained in:
@@ -15,6 +15,8 @@ class CerberusCanaryTest(unittest.TestCase):
|
|||||||
groups_schema = {'name': {'type': 'string', 'required': True}}
|
groups_schema = {'name': {'type': 'string', 'required': True}}
|
||||||
|
|
||||||
# On error, validate_schema() raises ValidationError
|
# 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)
|
validator.validate_schema(groups_schema)
|
||||||
|
|
||||||
# On error, validate() returns False
|
# On error, validate() returns False
|
||||||
|
Reference in New Issue
Block a user