Example #1
0
 def test_unlimited_db_allowed_injected_files(self):
     self.flags(quota_max_injected_files=5)
     db.quota_create(self.context, self.project_id, 'injected_files', None)
     self.assertEqual(quota.allowed_injected_files(self.context, 100), 100)
Example #2
0
 def test_unlimited_default_allowed_injected_files(self):
     self.flags(quota_max_injected_files=-1)
     self.assertEqual(quota.allowed_injected_files(self.context, 100), 100)
Example #3
0
 def test_overridden_allowed_injected_files(self):
     self.flags(quota_max_injected_files=5)
     db.quota_create(self.context, self.project_id, 'injected_files', 77)
     self.assertEqual(quota.allowed_injected_files(self.context, 100), 77)
Example #4
0
 def test_unlimited_db_allowed_injected_files(self):
     self.flags(quota_max_injected_files=5)
     db.quota_create(self.context, self.project_id, 'injected_files', None)
     self.assertEqual(quota.allowed_injected_files(self.context, 100), 100)
Example #5
0
 def test_unlimited_default_allowed_injected_files(self):
     self.flags(quota_max_injected_files=-1)
     self.assertEqual(quota.allowed_injected_files(self.context, 100), 100)
Example #6
0
 def test_overridden_allowed_injected_files(self):
     self.flags(quota_max_injected_files=5)
     db.quota_create(self.context, self.project_id, 'injected_files', 77)
     self.assertEqual(quota.allowed_injected_files(self.context, 100), 77)