File tree 1 file changed +7
-1
lines changed 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -441,7 +441,7 @@ def retrieve(uri):
441
441
registry = Registry ({"urn:example" : foo })
442
442
assert registry ["urn:example" ] == foo
443
443
444
- def test_retrieve_crawlable_resource (self ):
444
+ def test_retrieve_first_checks_crawlable_resource (self ):
445
445
def retrieve (uri ):
446
446
raise Exception ("Oh no!" )
447
447
@@ -692,6 +692,12 @@ def test_lookup_non_existent_anchor(self):
692
692
anchor = "noSuchAnchor" ,
693
693
)
694
694
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
+
695
701
# FIXME: The tests below aren't really representable in the current
696
702
# suite, though we should probably think of ways to do so.
697
703
You can’t perform that action at this time.
0 commit comments