def test_noRangeHeaderSetsContentHeaders(self):
        """
        makeProducer when no Range header is set sets the Content-* headers
        for the response.
        """
        length = 123
        contentType = "text/plain"
        contentEncoding = 'gzip'
        resource = self.makeResourceWithContent(
            b'a'*length, type=contentType, encoding=contentEncoding)
        request = DummyRequest([])
        with resource.openForReading() as file:
            resource.makeProducer(request, file)
            self.assertEqual(
                {b'content-type': networkString(contentType), b'content-length': intToBytes(length),
                 b'content-encoding': networkString(contentEncoding)},
                self.contentHeaders(request))

        makeProducer when no Range header is set sets the Content-* headers
        for the response.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_static.py