def test_getChildChildNotFound_customize(self):
        """
        The resource rendered for child not found requests can be customize
        using a class member.
        """
        base = FilePath(self.mktemp())
        base.setContent(b'')
        markerResponse = b'custom-child-not-found-response'

        class CustomChildNotFoundResource(resource.Resource):
            def render(self, request):
                return markerResponse

        class CustomStaticFile(static.File):
            childNotFound = CustomChildNotFoundResource()

        fileResource = CustomStaticFile(base.path)
        request = DummyRequest([b'no-child.txt'])

        child = fileResource.getChild(b'no-child.txt', request)
        result = child.render(request)

        self.assertEqual(markerResponse, result)

        The resource rendered for child not found requests can be customize
        using a class member.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_static.py