@skipIf((sys.getfilesystemencoding().lower() not in ('utf-8', 'mcbs')), 'Cannot write unicode filenames with file system encoding of {}'.format(sys.getfilesystemencoding()))
def test_staticFileUnicodeFileName(self):
    '\n        A request for a existing unicode file path encoded as UTF-8\n        returns the contents of that file.\n        '
    name = u'ῆ'
    content = b'content'
    base = FilePath(self.mktemp())
    base.makedirs()
    base.child(name).setContent(content)
    file = static.File(base.path)
    request = DummyRequest([name.encode('utf-8')])
    child = resource.getChildForRequest(file, request)
    d = self._render(child, request)

    def cbRendered(ignored):
        self.assertEqual(b''.join(request.written), content)
        self.assertEqual(request.responseHeaders.getRawHeaders(b'content-length')[0], networkString(str(len(content))))
    d.addCallback(cbRendered)
    return d
A request for a existing unicode file path encoded as UTF-8
returns the contents of that file.
@skipIf((sys.getfilesystemencoding().lower() not in ('utf-8', 'mcbs')), 'Cannot write unicode filenames with file system encoding of {}'.format(sys.getfilesystemencoding()))
def test_staticFileUnicodeFileName(self):
    '\n        A request for a existing unicode file path encoded as UTF-8\n        returns the contents of that file.\n        '
    name = u'ῆ'
    content = b'content'
    base = FilePath(self.mktemp())
    base.makedirs()
    base.child(name).setContent(content)
    file = static.File(base.path)
    request = DummyRequest([name.encode('utf-8')])
    child = resource.getChildForRequest(file, request)
    d = self._render(child, request)

    def cbRendered(ignored):
        self.assertEqual(b.join(request.written), content)
        self.assertEqual(request.responseHeaders.getRawHeaders(b'content-length')[0], networkString(str(len(content))))
    d.addCallback(cbRendered)
    return d