增加环绕侦察场景适配
This commit is contained in:
@@ -321,7 +321,7 @@ class TestBestMatch(TestCase):
|
||||
|
||||
def test_one_error(self):
|
||||
validator = _LATEST_VERSION({"minProperties": 2})
|
||||
error, = validator.iter_errors({})
|
||||
validator.iter_errors({})
|
||||
self.assertEqual(
|
||||
exceptions.best_match(validator.iter_errors({})).validator,
|
||||
"minProperties",
|
||||
|
||||
@@ -2379,11 +2379,9 @@ class TestRefResolver(TestCase):
|
||||
self.assertEqual(url, "http://bar")
|
||||
yield BytesIO(json.dumps(schema).encode("utf8"))
|
||||
|
||||
self.addCleanup(setattr, validators, "urlopen", validators.urlopen)
|
||||
validators.urlopen = fake_urlopen
|
||||
|
||||
with self.resolver.resolving(ref) as resolved:
|
||||
pass
|
||||
with mock.patch("urllib.request.urlopen", new=fake_urlopen): # noqa: SIM117
|
||||
with self.resolver.resolving(ref) as resolved:
|
||||
pass
|
||||
self.assertEqual(resolved, 12)
|
||||
|
||||
def test_it_retrieves_local_refs_via_urlopen(self):
|
||||
|
||||
Reference in New Issue
Block a user