def test_singleRangeSetsContentHeaders(self):
        """
        makeProducer when the Range header requests a single, satisfiable byte
        range sets the Content-* headers appropriately.
        """
        request = DummyRequest([])
        request.requestHeaders.addRawHeader(b'range', b'bytes=1-3')
        contentType = "text/plain"
        contentEncoding = 'gzip'
        resource = self.makeResourceWithContent(b'abcdef', type=contentType, encoding=contentEncoding)
        with resource.openForReading() as file:
            resource.makeProducer(request, file)
            self.assertEqual(
                {b'content-type': networkString(contentType),
                 b'content-encoding': networkString(contentEncoding),
                 b'content-range': b'bytes 1-3/6', b'content-length': b'3'},
                self.contentHeaders(request))

        makeProducer when the Range header requests a single, satisfiable byte
        range sets the Content-* headers appropriately.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_static.py