def setUp(self): """Run before each test.""" super(UsedLimitsTestCase, self).setUp() self.controller = used_limits.UsedLimitsController() self.fake_context = nova.context.RequestContext('fake', 'fake') self.fake_req = FakeRequest(self.fake_context)
def setUp(self): """Run before each test.""" super(UsedLimitsTestCase, self).setUp() self.ext_mgr = self.mox.CreateMock(extensions.ExtensionManager) self.controller = used_limits.UsedLimitsController(self.ext_mgr) self.fake_context = nova.context.RequestContext('fake', 'fake') self.mox.StubOutWithMock(used_limits, 'authorize_for_admin') self.authorize_for_admin = used_limits.authorize_for_admin
def setUp(self): """Run before each test.""" super(UsedLimitsTestCaseXml, self).setUp() self.ext_mgr = self.mox.CreateMock(extensions.ExtensionManager) self.controller = used_limits_v2.UsedLimitsController(self.ext_mgr) self.fake_context = nova.context.RequestContext('fake', 'fake')
def _set_up_controller(self): self.ext_mgr = self.mox.CreateMock(extensions.ExtensionManager) self.controller = used_limits_v2.UsedLimitsController(self.ext_mgr) self.mox.StubOutWithMock(used_limits_v2, 'authorize_for_admin') self.authorize = used_limits_v2.authorize_for_admin