diff options
author | Zuul <zuul@review.opendev.org> | 2023-03-06 23:12:05 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-03-06 23:12:05 +0000 |
commit | baa3cc712cbf37a077291f69d8b621bd6f759132 (patch) | |
tree | 1d463c7442821d59f68fa9164bc12cbae6ea949d | |
parent | 0ea86c37adcf3289f04f0aa6f18811ec1619780c (diff) | |
parent | 21f40f3df22561a96164daedbb09032686392f22 (diff) | |
download | tempest-baa3cc712cbf37a077291f69d8b621bd6f759132.tar.gz |
Merge "Revert "Fix DeprecationWarning of jsonschema""
-rw-r--r-- | tempest/lib/common/jsonschema_validator.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tempest/lib/common/jsonschema_validator.py b/tempest/lib/common/jsonschema_validator.py index 5212221c3..1618175c1 100644 --- a/tempest/lib/common/jsonschema_validator.py +++ b/tempest/lib/common/jsonschema_validator.py @@ -18,7 +18,7 @@ from oslo_utils import timeutils # JSON Schema validator and format checker used for JSON Schema validation JSONSCHEMA_VALIDATOR = jsonschema.Draft4Validator -FORMAT_CHECKER = jsonschema.Draft4Validator.FORMAT_CHECKER +FORMAT_CHECKER = jsonschema.draft4_format_checker # NOTE(gmann): Add customized format checker for 'date-time' format because: @@ -39,7 +39,7 @@ def _validate_datetime_format(instance): return True -@FORMAT_CHECKER.checks('base64') +@jsonschema.FormatChecker.cls_checks('base64') def _validate_base64_format(instance): try: if isinstance(instance, str): |