def test_noRangeHeaderSetsContentHeaders(self):
    '\n        makeProducer when no Range header is set sets the Content-* headers\n        for the response.\n        '
    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': (b'%d' % (length,)), b'content-encoding': networkString(contentEncoding)}, self.contentHeaders(request))
makeProducer when no Range header is set sets the Content-* headers
for the response.
def test_noRangeHeaderSetsContentHeaders(self):
    '\n        makeProducer when no Range header is set sets the Content-* headers\n        for the response.\n        '
    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': (b'%d' % (length,)), b'content-encoding': networkString(contentEncoding)}, self.contentHeaders(request))