def test_directoryWithoutTrailingSlashRedirects(self):
    '\n        A request for a path which is a directory but does not have a trailing\n        slash will be redirected to a URL which does have a slash by L{File}.\n        '
    base = FilePath(self.mktemp())
    base.makedirs()
    base.child('folder').makedirs()
    file = static.File(base.path)
    request = DummyRequest([b'folder'])
    request.uri = b'http://dummy/folder#baz?foo=bar'
    child = resource.getChildForRequest(file, request)
    self.successResultOf(self._render(child, request))
    self.assertEqual(request.responseCode, FOUND)
    self.assertEqual(request.responseHeaders.getRawHeaders(b'location'), [b'http://dummy/folder/#baz?foo=bar'])
A request for a path which is a directory but does not have a trailing
slash will be redirected to a URL which does have a slash by L{File}.
def test_directoryWithoutTrailingSlashRedirects(self):
    '\n        A request for a path which is a directory but does not have a trailing\n        slash will be redirected to a URL which does have a slash by L{File}.\n        '
    base = FilePath(self.mktemp())
    base.makedirs()
    base.child('folder').makedirs()
    file = static.File(base.path)
    request = DummyRequest([b'folder'])
    request.uri = b'http://dummy/folder#baz?foo=bar'
    child = resource.getChildForRequest(file, request)
    self.successResultOf(self._render(child, request))
    self.assertEqual(request.responseCode, FOUND)
    self.assertEqual(request.responseHeaders.getRawHeaders(b'location'), [b'http://dummy/folder/#baz?foo=bar'])