增加环绕侦察场景适配

This commit is contained in:
2026-01-08 15:44:38 +08:00
parent 3eba1f962b
commit 10c5bb5a8a
5441 changed files with 40219 additions and 379695 deletions

View File

@@ -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",

View File

@@ -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):