def test_render(self):
    '\n        L{UserDirectory} renders a list of links to available user content\n        in response to a I{GET} request.\n        '
    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(b'')
    request = DummyRequest([''])
    result = _render(self.directory, request)

    def cbRendered(ignored):
        document = parseString(b''.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
L{UserDirectory} renders a list of links to available user content
in response to a I{GET} request.
def test_render(self):
    '\n        L{UserDirectory} renders a list of links to available user content\n        in response to a I{GET} request.\n        '
    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(b)
    request = DummyRequest([])
    result = _render(self.directory, request)

    def cbRendered(ignored):
        document = parseString(b.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