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

def test_mutipleRangeSetsContentHeaders(self):

    request = DummyRequest([])
    request.requestHeaders.addRawHeader('range', 'bytes=1-3,5-6')
    resource = self.makeResourceWithContent('abcdefghijkl', encoding='gzip')
    with resource.openForReading() as file:
        producer = resource.makeProducer(request, file)
        contentHeaders = self.contentHeaders(request)
        self.assertEqual(set(['content-length', 'content-type']), set(contentHeaders.keys()))
        expectedLength = 5
        for (boundary, offset, size) in producer.rangeInfo:
            expectedLength += len(boundary)
        self.assertEqual(intToBytes(expectedLength), contentHeaders['content-length'])
        self.assertIn('content-type', contentHeaders)
        contentType = contentHeaders['content-type']
        self.assertNotIdentical(None, re.match('multipart/byteranges;    boundary="[^"]*"\\Z', contentType))
        self.assertNotIn('content-encoding', contentHeaders)
