Пример #1
0
 def setUp(self):
     super(QuotaEngineTestCase, self).setUp()
     self.ctxt = 'fake_context'
     self.mock_class('manila.quota.DbQuotaDriver')
     self.engine = quota.QuotaEngine()
     self.driver = self.engine._driver
     self.resources = [quota.BaseResource('foo'), quota.BaseResource('bar')]
     self.project_id = 'fake_project_id'
     self.user_id = 'fake_user_id'
     self.share_type_id = 'fake_share_type_id'
     self.quota_class = 'fake_quota_class'
Пример #2
0
 def setUp(self):
     super(DbQuotaDriverTestCase, self).setUp()
     self.project_id = 'fake_project_id'
     self.user_id = 'fake_user_id'
     self.share_type_id = 'fake_share_type_id'
     self.ctxt = type(
         'FakeContext', (object, ),
         {'project_id': self.project_id, 'user_id': self.user_id,
          'quota_class': 'fake_quota_class', 'elevated': mock.Mock()})
     self.driver = quota.DbQuotaDriver()
     self.reservations = ['foo', 'bar']
     self.resources = {k: quota.BaseResource(k) for k in ('foo', 'bar')}