'L{UserDirectory} renders a list of links to available user content
in response to a I{GET} request.'

def test_render(self):

    public_html = filepath.FilePath(self.alice[(-2)]).child('public_html')
    public_html.makedirs()
    web = filepath.FilePath(self.bob[(-2)])
    web.makedirs()
    web.child('.twistd-web-pb').setContent('')
    request = DummyRequest([''])
    result = _render(self.directory, request)
    def cbRendered(ignored):
        document = parseString(''.join(request.written))
        [alice, bob] = document.getElementsByTagName('li')
        self.assertEqual(alice.firstChild.tagName, 'a')
        self.assertEqual(alice.firstChild.getAttribute('href'), 'alice/')
        self.assertEqual(alice.firstChild.firstChild.data, 'Alice    (file)')
        self.assertEqual(bob.firstChild.tagName, 'a')
        self.assertEqual(bob.firstChild.getAttribute('href'), 'bob.twistd/')
        self.assertEqual(bob.firstChild.firstChild.data, 'Bob    (twistd)')
    result.addCallback(cbRendered)
    return result
