File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -441,7 +441,7 @@ def retrieve(uri):
441441 registry = Registry ({"urn:example" : foo })
442442 assert registry ["urn:example" ] == foo
443443
444- def test_retrieve_crawlable_resource (self ):
444+ def test_retrieve_first_checks_crawlable_resource (self ):
445445 def retrieve (uri ):
446446 raise Exception ("Oh no!" )
447447
@@ -692,6 +692,12 @@ def test_lookup_non_existent_anchor(self):
692692 anchor = "noSuchAnchor" ,
693693 )
694694
695+ def test_lookup_retrieved_resource (self ):
696+ resource = Resource .opaque (contents = {"foo" : "baz" })
697+ resolver = Registry (retrieve = lambda uri : resource ).resolver ()
698+ resolved = resolver .lookup ("http://example.com/" )
699+ assert resolved .contents == resource .contents
700+
695701 # FIXME: The tests below aren't really representable in the current
696702 # suite, though we should probably think of ways to do so.
697703
You can’t perform that action at this time.
0 commit comments