def setUp(self): super(ShareSnapshotApiTest, self).setUp() self.controller = share_snapshots.ShareSnapshotsController() self.stubs.Set(share_api.API, 'get', stubs.stub_share_get) self.stubs.Set(share_api.API, 'get_all_snapshots', stubs.stub_snapshot_get_all_by_project) self.stubs.Set(share_api.API, 'get_snapshot', stubs.stub_snapshot_get) self.stubs.Set(share_api.API, 'snapshot_update', stubs.stub_snapshot_update) self.snp_example = { 'share_id': 100, 'size': 12, 'force': False, 'display_name': 'updated_share_name', 'display_description': 'updated_share_description', } self.maxDiff = None
def setUp(self): super(ShareSnapshotAdminActionsAPITest, self).setUp() self.controller = share_snapshots.ShareSnapshotsController() self.flags(transport_url='rabbit://*****:*****@mqhost:5672') self.admin_context = context.RequestContext('admin', 'fake', True) self.member_context = context.RequestContext('fake', 'fake')
def setUp(self): super(self.__class__, self).setUp() self.controller = share_snapshots.ShareSnapshotsController() self.flags(rpc_backend='manila.openstack.common.rpc.impl_fake') self.admin_context = context.RequestContext('admin', 'fake', True) self.member_context = context.RequestContext('fake', 'fake')