def test_singleRangeSetsContentHeaders(self):
    '\n        makeProducer when the Range header requests a single, satisfiable byte\n        range sets the Content-* headers appropriately.\n        '
    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.
def test_singleRangeSetsContentHeaders(self):
    '\n        makeProducer when the Range header requests a single, satisfiable byte\n        range sets the Content-* headers appropriately.\n        '
    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))