'Test a rate-limited (413) GET request through middleware.'

def test_limited_request_json(self):

    request = webob.Request.blank('/')
    response = request.get_response(self.app)
    self.assertEqual(http_client.OK, response.status_int)
    request = webob.Request.blank('/')
    response = request.get_response(self.app)
    self.assertEqual(http_client.REQUEST_ENTITY_TOO_LARGE, response.status_int)
    self.assertIn('Retry-After', response.headers)
    retry_after = int(response.headers['Retry-After'])
    self.assertAlmostEqual(retry_after, 60, 1)
    body = jsonutils.loads(response.body)
    expected = 'Only    1    GET    request(s)    can    be    made    to    *    every    minute.'
    value = body['overLimitFault']['details'].strip()
    self.assertEqual(expected, value)
