'Helper to set routing arguments.'

def _get_index_request(self, accept_header='application/json'):

    request = webob.Request.blank('/')
    request.accept = accept_header
    request.environ['wsgiorg.routing_args'] = (None, {'action': 'index', 'controller': ''})
    context = cinder.context.RequestContext('testuser', 'testproject')
    request.environ['cinder.context'] = context
    return request
