def _set_up_controller(self): self.ext_mgr = None self.controller = used_limits_v21.UsedLimitsController() patcher = self.mock_can = mock.patch('nova.context.RequestContext.can') self.mock_can = patcher.start() self.addCleanup(patcher.stop)
def _set_up_controller(self): self.ext_mgr = None self.controller = used_limits_v21.UsedLimitsController() self.mox.StubOutWithMock(used_limits_v21, 'authorize') self.authorize = used_limits_v21.authorize