'makeProducer when the Range header requests a single, satisfiable byte
range sets the Content-* headers appropriately.'

def test_singleRangeSetsContentHeaders(self):

    request = DummyRequest([])
    request.requestHeaders.addRawHeader('range', 'bytes=1-3')
    contentType = 'text/plain'
    contentEncoding = 'gzip'
    resource = self.makeResourceWithContent('abcdef', type=contentType, encoding=contentEncoding)
    with resource.openForReading() as file:
        resource.makeProducer(request, file)
        self.assertEqual({'content-type': networkString(contentType), 'content-encoding': networkString(contentEncoding), 'content-range': 'bytes    1-3/6', 'content-length': '3'}, self.contentHeaders(request))
