def test_contentType(self):
        """
        L{static.DirectoryLister} produces a MIME-type that indicates that it is
        HTML, and includes its charset (UTF-8).
        """
        path = FilePath(self.mktemp())
        path.makedirs()
        lister = static.DirectoryLister(path.path)
        req = self._request(b'')
        lister.render(req)
        self.assertEqual(req.responseHeaders.getRawHeaders(b'content-type')[0],
                          b"text/html; charset=utf-8")

        L{static.DirectoryLister} produces a MIME-type that indicates that it is
        HTML, and includes its charset (UTF-8).
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_static.py