Esempio n. 1
0
    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)
Esempio n. 2
0
    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
Esempio n. 3
0
 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')
Esempio n. 4
0
 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