def test_getChildChildNotFound_customize(self):
    '\n        The resource rendered for child not found requests can be customize\n        using a class member.\n        '
    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.
def test_getChildChildNotFound_customize(self):
    '\n        The resource rendered for child not found requests can be customize\n        using a class member.\n        '
    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)