#    ''')

    def testAnchorResolution( self ):
        d = getDescriptor('anchor_beasty')
        rendered = d.getRendered()
        
        self.resolver.resolve( d)
        rendered_target = d.getRendered()
        uris = test_uri_regex.findall( rendered_target )
        expected = (
            '/deploy/reptiles/snake.html#toxin',
            '/deploy/reptiles/lizard.html#gila'
            )
#    This is a test <a href="./lizard?part=head&fo=sn frg">lizard</a>       

    def testQueryResolution( self ):
        d  = getDescriptor('query_beasty')
        rendered = d.getRendered()
        self.resolver.resolve( d )
        
        rendered_target = d.getRendered()        
        uris = test_uri_regex.findall( rendered_target )
        expected = (
            '/deploy/reptiles/snake.html?q=toxin',
            '/deploy/reptiles/lizard.html?part=head&fo=sn frg'
            )
        for u in uris:
            assert u in expected
            
    def testResolve4(self):
        # composite content test
        d = getDescriptor("loch_ness")
        self.resolver.resolve(d)
        rendered_target = d.getRendered()

        expected = (            
            '/deploy/reptiles/snake.html',
            '/deploy/reptiles/lizard.html',
            )            
        uris = test_uri_regex.findall(rendered_target)
        self.assertEqual(len(uris), len(expected))
            assert u in expected

    def testResolve2(self):
        # test replacement algorithm

        d = getDescriptor('lizard')
        self.resolver.resolve(d)
        rendered_target = d.getRendered()

        expected = (            
            '/deploy/reptiles/snake.html',
            '/deploy/reptiles/snake.html',
            )
            
        uris = test_uri_regex.findall(rendered_target)        
        self.assertEqual(len(uris), len(expected))
            assert u in expected        

    def testResolve3(self):
        # test folder resolve

        d = getDescriptor('reptiles')
        self.resolver.resolve(d)
        rendered_target = d.getRendered()

        expected = (
            '/deploy/reptiles/index.html',
            '/deploy/reptiles/snake.html',
            '/deploy/reptiles/lizard.html',
            )            

        uris = test_uri_regex.findall(rendered_target)        
        self.assertEqual(len(uris), len(expected))
class ResolverTests(BaseResolverTests):

    def testResolve(self):

        d = getDescriptor('snake')
        self.resolver.resolve(d)
        rendered_target = d.getRendered()

        expected = (            
            '/deploy/index.html',
            '/deploy/mammals/elephant.html',
            '/deploy/reptiles/snake.html',
            '/deploy/reptiles/lizard.html'
            )
            
        uris = test_uri_regex.findall(rendered_target)        
        self.assertEqual(len(uris), len(expected))