def setUp(self): super(MigrationsPolicyTest, self).setUp() self.controller = migrations.MigrationsController() self.req = fakes.HTTPRequest.blank('') # With legacy rule, any admin is able to list migrations. self.project_admin_authorized_contexts = [ self.legacy_admin_context, self.system_admin_context, self.project_admin_context ]
def setUp(self): super(MigrationsPolicyTest, self).setUp() self.controller = migrations.MigrationsController() self.req = fakes.HTTPRequest.blank('') # Check that admin is able to list migrations. self.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-admin is not able to list migrations. self.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(MigrationsPolicyEnforcement, self).setUp() self.controller = migrations_v21.MigrationsController() self.req = fakes.HTTPRequest.blank('')