def test_singleRangeSets206PartialContent(self):
    "\n        makeProducer when the Range header requests a single, satisfiable byte\n        range sets the response code on the request to 'Partial Content'.\n        "
    request = DummyRequest([])
    request.requestHeaders.addRawHeader(b'range', b'bytes=1-3')
    resource = self.makeResourceWithContent(b'abcdef')
    with resource.openForReading() as file:
        resource.makeProducer(request, file)
        self.assertEqual(http.PARTIAL_CONTENT, request.responseCode)
makeProducer when the Range header requests a single, satisfiable byte
range sets the response code on the request to 'Partial Content'.
def test_singleRangeSets206PartialContent(self):
    "\n        makeProducer when the Range header requests a single, satisfiable byte\n        range sets the response code on the request to 'Partial Content'.\n        "
    request = DummyRequest([])
    request.requestHeaders.addRawHeader(b'range', b'bytes=1-3')
    resource = self.makeResourceWithContent(b'abcdef')
    with resource.openForReading() as file:
        resource.makeProducer(request, file)
        self.assertEqual(http.PARTIAL_CONTENT, request.responseCode)