#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# test . TestCase . setUp ( self ) #NEWLINE# self . mock_client = mock . Mock ( ) #NEWLINE# self . cs_patch = mockpatch . PatchObject ( cinder_client , 'Client' , new = self . mock_client ) #NEWLINE# self . useFixture ( self . cs_patch ) #NEWLINE# self . identity_mock = mock . Mock ( ) #NEWLINE# self . compute_mock = mock . Mock ( ) #NEWLINE# self . override_config ( FAKE_CONFIG ) #NEWLINE# self . fake_cloud = mock . Mock ( ) #NEWLINE# self . fake_cloud . position = 'src' #NEWLINE# self . fake_cloud . resources = dict ( identity = self . identity_mock , compute = self . compute_mock ) #NEWLINE# self . fake_cloud . config = self . cloud_config ( 'src' ) #NEWLINE# self . cinder_client = cinder_storage . CinderStorage ( self . fake_cloud . config , self . fake_cloud ) #NEWLINE# filter_yaml = mock . Mock ( ) #NEWLINE# filter_yaml . get_tenant . return_value = None #NEWLINE# filter_yaml . get_volume_ids . return_value = [ ] #NEWLINE# filter_yaml . get_volume_date . return_value = None #NEWLINE# self . cinder_client . volume_filter = filters . CinderFilters ( self . cinder_client , filter_yaml = filter_yaml ) #NEWLINE# self . fake_volume_0 = mock . Mock ( ) #NEWLINE# self . fake_volume_0 . status = 'available' #NEWLINE# self . fake_volume_1 = mock . Mock ( ) #NEWLINE# self . fake_volume_1 . status = 'available' #NEWLINE# self . mock_client ( ) . volumes . get . return_value = self . fake_volume_0