def stub_out_rate_limiting(stubs):

    def fake_rate_init(self, app):
        super(limits.RateLimitingMiddleware, self).__init__(app)
        self.application = app
    v2_limits = nova.api.openstack.compute.legacy_v2.limits
    stubs.Set(v2_limits.RateLimitingMiddleware, '__init__', fake_rate_init)
    stubs.Set(v2_limits.RateLimitingMiddleware, '__call__', fake_wsgi)
def stub_out_rate_limiting(stubs):

    def fake_rate_init(self, app):
        super(limits.RateLimitingMiddleware, self).__init__(app)
        self.application = app
    v2_limits = nova.api.openstack.compute.legacy_v2.limits
    stubs.Set(v2_limits.RateLimitingMiddleware, '__init__', fake_rate_init)
    stubs.Set(v2_limits.RateLimitingMiddleware, '__call__', fake_wsgi)