def test_emptyChildUnicodeParent(self):
    "\n        The C{u''} child of a L{File} which corresponds to a directory\n        whose path is text is a L{DirectoryLister} that renders to a\n        binary listing.\n\n        @see: U{https://twistedmatrix.com/trac/ticket/9438}\n        "
    textBase = FilePath(self.mktemp()).asTextMode()
    textBase.makedirs()
    textBase.child(u'text-file').open('w').close()
    textFile = static.File(textBase.path)
    request = DummyRequest([b''])
    child = resource.getChildForRequest(textFile, request)
    self.assertIsInstance(child, static.DirectoryLister)
    nativePath = compat.nativeString(textBase.path)
    self.assertEqual(child.path, nativePath)
    response = child.render(request)
    self.assertIsInstance(response, bytes)
The C{u''} child of a L{File} which corresponds to a directory
whose path is text is a L{DirectoryLister} that renders to a
binary listing.

@see: U{https://twistedmatrix.com/trac/ticket/9438}
def test_emptyChildUnicodeParent(self):
    "\n        The C{u} child of a L{File} which corresponds to a directory\n        whose path is text is a L{DirectoryLister} that renders to a\n        binary listing.\n\n        @see: U{https://twistedmatrix.com/trac/ticket/9438}\n        "
    textBase = FilePath(self.mktemp()).asTextMode()
    textBase.makedirs()
    textBase.child(u'text-file').open('w').close()
    textFile = static.File(textBase.path)
    request = DummyRequest([b])
    child = resource.getChildForRequest(textFile, request)
    self.assertIsInstance(child, static.DirectoryLister)
    nativePath = compat.nativeString(textBase.path)
    self.assertEqual(child.path, nativePath)
    response = child.render(request)
    self.assertIsInstance(response, bytes)