def test_staticFileDeletedRender(self):
        """
        A L{static.File} created for a file which does not exist should render
        its C{childNotFound} page.
        """
        staticFile = static.File(self.mktemp())
        request = DummyRequest([b'foo.bar'])
        request2 = DummyRequest([b'foo.bar'])
        d = self._render(staticFile, request)
        d2 = self._render(staticFile.childNotFound, request2)
        def cbRendered2(ignored):
            def cbRendered(ignored):
                self.assertEqual(b''.join(request.written),
                                 b''.join(request2.written))
            d.addCallback(cbRendered)
            return d
        d2.addCallback(cbRendered2)
        return d2

        A L{static.File} created for a file which does not exist should render
        its C{childNotFound} page.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_static.py