'makeProducer sets the response code of the request to of \'Requested
Range Not Satisfiable\' when the Range header requests a single
unsatisfiable byte range.'

def test_singleUnsatisfiableRangeSets416ReqestedRangeNotSatisfiable(self):

    request = DummyRequest([])
    request.requestHeaders.addRawHeader('range', 'bytes=4-10')
    resource = self.makeResourceWithContent('abc')
    with resource.openForReading() as file:
        resource.makeProducer(request, file)
        self.assertEqual(http.REQUESTED_RANGE_NOT_SATISFIABLE, request.responseCode)
