diff options
author | Julian Berman <Julian@GrayVines.com> | 2023-02-15 14:04:49 +0200 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2023-02-21 09:58:40 +0200 |
commit | 635dc13c9167f7b2c85ed1f2a8d11339d8b1096e (patch) | |
tree | 9c4ba96ca8046235bc640608beb51c0e5f7d8d26 /jsonschema/tests/test_validators.py | |
parent | 9da55dfa02c54b8e638a35362fb99755e5d46ce5 (diff) | |
download | jsonschema-635dc13c9167f7b2c85ed1f2a8d11339d8b1096e.tar.gz |
Deprecate Validator.resolver.
It will imminently be replaced by referencing.Registry-based
resolution.
Diffstat (limited to 'jsonschema/tests/test_validators.py')
-rw-r--r-- | jsonschema/tests/test_validators.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/jsonschema/tests/test_validators.py b/jsonschema/tests/test_validators.py index f94b69b..a76b247 100644 --- a/jsonschema/tests/test_validators.py +++ b/jsonschema/tests/test_validators.py @@ -1735,10 +1735,9 @@ class ValidatorTestMixin(MetaSchemaTestsMixin, object): validator.validate(instance) def test_it_creates_a_ref_resolver_if_not_provided(self): - self.assertIsInstance( - self.Validator({}).resolver, - validators._RefResolver, - ) + with self.assertWarns(DeprecationWarning): + resolver = self.Validator({}).resolver + self.assertIsInstance(resolver, validators._RefResolver) def test_it_upconverts_from_deprecated_RefResolvers(self): ref, schema = "someCoolRef", {"type": "integer"} |