def setUp(self): super(QuotaClassSetsPolicyTest, self).setUp() self.controller = quota_classes.QuotaClassSetsController() self.req = fakes.HTTPRequest.blank('') # Check that admin is able to update quota class self.admin_authorized_contexts = [ self.legacy_admin_context, self.system_admin_context, self.project_admin_context] # Check that non-admin is not able to update quota class self.admin_unauthorized_contexts = [ self.system_member_context, self.system_reader_context, self.system_foo_context, self.project_member_context, self.project_reader_context, self.project_foo_context, self.other_project_member_context ] # Check that system reader is able to get quota class self.system_reader_authorized_contexts = [ self.legacy_admin_context, self.system_admin_context, self.project_admin_context, self.system_member_context, self.system_reader_context] # Check that non-system reader is not able to get quota class self.system_reader_unauthorized_contexts = [ self.system_foo_context, self.project_member_context, self.project_reader_context, self.project_foo_context, self.other_project_member_context ]
def setUp(self): super(QuotaClassSetsPolicyTest, self).setUp() self.controller = quota_classes.QuotaClassSetsController() self.req = fakes.HTTPRequest.blank('') # With legacy rule and scope check disabled by default, system admin, # legacy admin, and project admin will be able to get, update quota # class. self.system_admin_authorized_contexts = [ self.legacy_admin_context, self.system_admin_context, self.project_admin_context]
def _setup(self): ext_info = extension_info.LoadedExtensionInfo() self.controller = quota_classes_v21.QuotaClassSetsController( extension_info=ext_info)
def setUp(self): super(QuotaClassesPolicyEnforcementV21, self).setUp() ext_info = extension_info.LoadedExtensionInfo() self.controller = quota_classes_v21.QuotaClassSetsController( extension_info=ext_info) self.req = fakes.HTTPRequest.blank('')
def _setup(self): self.controller = quota_classes_v21.QuotaClassSetsController()
def setUp(self): super(QuotaClassesPolicyEnforcementV21, self).setUp() self.controller = quota_classes_v21.QuotaClassSetsController() self.req = fakes.HTTPRequest.blank('')
def setUp(self): super(NoopQuotaClassesTest, self).setUp() self.flags(driver=self.quota_driver, group="quota") self.controller = quota_classes_v21.QuotaClassSetsController()