def test_securityViolationNotFound(self):
    '\n        If a request is made which encounters a L{File} before a final segment\n        which cannot be looked up in the filesystem due to security\n        considerations, a not found response is sent.\n        '
    base = FilePath(self.mktemp())
    base.makedirs()
    file = static.File(base.path)
    request = DummyRequest([b'..'])
    child = resource.getChildForRequest(file, request)
    d = self._render(child, request)

    def cbRendered(ignored):
        self.assertEqual(request.responseCode, 404)
    d.addCallback(cbRendered)
    return d
If a request is made which encounters a L{File} before a final segment
which cannot be looked up in the filesystem due to security
considerations, a not found response is sent.
def test_securityViolationNotFound(self):
    '\n        If a request is made which encounters a L{File} before a final segment\n        which cannot be looked up in the filesystem due to security\n        considerations, a not found response is sent.\n        '
    base = FilePath(self.mktemp())
    base.makedirs()
    file = static.File(base.path)
    request = DummyRequest([b'..'])
    child = resource.getChildForRequest(file, request)
    d = self._render(child, request)

    def cbRendered(ignored):
        self.assertEqual(request.responseCode, 404)
    d.addCallback(cbRendered)
    return d