VULN_CHECK_I913V6 % g`ddlmZddlZddlZddlmZmZmZddlm Z ddl m Z GddZ y)) lru_cacheN)RegistryResource exceptions) DRAFT202012)to_cached_resourcec$eZdZdZdZdZdZy)TestToCachedResourcecddi}tj|gtfd}t|}t j |}|j d}|j d}y)N$schema,https://json-schema.org/draft/2020-12/schemac$jSNpopuristacks E/usr/lib/python3.12/site-packages/referencing/tests/test_retrieval.pyretrievezITestToCachedResource.test_it_caches_retrieved_resources..retrieve99; rurn:example:schemajsondumpsrrr from_contentsget_or_retrieveselfcontentsrregistryexpectedgotagainrs @r"test_it_caches_retrieved_resourcesz7TestToCachedResource.test_it_caches_retrieved_resources stMNH%&     X.))(3&&';<(()=>rcddi}tj|dddgtdfd}t|}t j |}|j d}|j d}y) Nr r c8tj|dddS)Nr))rloads)ss rz9TestToCachedResource.test_custom_loader..#sDJJq2w,?r)r+c$jSrrrs rrz9TestToCachedResource.test_custom_loader..retrieve#rrrrrr s @rtest_custom_loaderz'TestToCachedResource.test_custom_loadersMNH%dd+, "? @  A X.))(3&&';<(()=>rci}tj|gttjfd}t |}tj|}|j d}|j d}y)N)rc$jSrrrs rrz@TestToCachedResource.test_custom_from_contents..retrieve6rrrr)rrrrcreate_resourcerrr s @rtest_custom_from_contentsz.TestToCachedResource.test_custom_from_contents2swH%& +*E*E F  G X...x8&&';<(()=>rc ddi}t|dt|dt|ddjDcic]\}}|tj|}}}t t d fd }t | }|jd }|jd }|jd}tjtj5|jd dddycc}}w#1swYyxYw)Nr r )foo) urn:example:1 urn:example:2 urn:example:3)maxsize)cachecLtjj|Sr)rrr)rmappings rrz8TestToCachedResource.test_custom_cache..retrieveRs::gkk#./ /rrr9r:r;) dictitemsrrrrrrpytestraisesr Unretrievable) r!schemarr" resourcesrr#r%r?s @rtest_custom_cachez&TestToCachedResource.test_custom_cacheEsKL!&a0!&a0!&a0 ") !0 X ''1 1!0  )A"6 7 0 8 0X.&&7 &&7 &&7 ]]:33 4  $ $_ 55 49 85 4s C>#DD N)__name__ __module__ __qualname__r'r/r3rGrrr r s(&(&(&%6rr ) functoolsrrrB referencingrrrreferencing.jsonschemarreferencing.retrievalrr rKrrrPs& 66.4_6_6r