@skipIf(platform.isWindows(), 'Cannot remove read permission on Windows')
def test_forbiddenResource(self):
    '\n        If the file in the filesystem which would satisfy a request cannot be\n        read, L{File.render} sets the HTTP response code to I{FORBIDDEN}.\n        '
    base = FilePath(self.mktemp())
    base.setContent(b'')
    self.addCleanup(base.chmod, 448)
    base.chmod(0)
    file = static.File(base.path)
    request = DummyRequest([b''])
    d = self._render(file, request)

    def cbRendered(ignored):
        self.assertEqual(request.responseCode, 403)
    d.addCallback(cbRendered)
    return d
If the file in the filesystem which would satisfy a request cannot be
read, L{File.render} sets the HTTP response code to I{FORBIDDEN}.
@skipIf(platform.isWindows(), 'Cannot remove read permission on Windows')
def test_forbiddenResource(self):
    '\n        If the file in the filesystem which would satisfy a request cannot be\n        read, L{File.render} sets the HTTP response code to I{FORBIDDEN}.\n        '
    base = FilePath(self.mktemp())
    base.setContent(b)
    self.addCleanup(base.chmod, 448)
    base.chmod(0)
    file = static.File(base.path)
    request = DummyRequest([b])
    d = self._render(file, request)

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