def test_notFound(self):
    '\n        If a request is made which encounters a L{File} before a final segment\n        which does not correspond to any file in the path the L{File} was\n        created with, a not found response is sent.\n        '
    base = FilePath(self.mktemp())
    base.makedirs()
    file = static.File(base.path)
    request = DummyRequest([b'foobar'])
    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 does not correspond to any file in the path the L{File} was
created with, a not found response is sent.
def test_notFound(self):
    '\n        If a request is made which encounters a L{File} before a final segment\n        which does not correspond to any file in the path the L{File} was\n        created with, a not found response is sent.\n        '
    base = FilePath(self.mktemp())
    base.makedirs()
    file = static.File(base.path)
    request = DummyRequest([b'foobar'])
    child = resource.getChildForRequest(file, request)
    d = self._render(child, request)

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