#NEWLINE# def test_convert_volume( self ) : #NEWLINE# #INDENT# vol = mock . Mock ( id = 'id1' , size = 1024 , display_name = 'display_name' , display_description = 'display_description' , availability_zone = 'availability_zone' , volume_type = 'volume_type' , attachments = [ { #NEWLINE# #INDENT# 'device' : 'sdb' , #NEWLINE# #UNINDENT# } ] , bootable = 'true' , metadata = { #NEWLINE# #INDENT# 'data' : 'data' , #NEWLINE# #UNINDENT# } , volume_image_metadata = { #NEWLINE# #INDENT# 'image_id' : 'id' , #NEWLINE# 'checksum' : 'checksum' , #NEWLINE# 'image_name' : 'name' , #NEWLINE# 'size' : '1024' , #NEWLINE# #UNINDENT# } ) #NEWLINE# setattr ( converted_vol , 'os-vol-tenant-attr:tenant_id' , 'tenant_id' ) #NEWLINE# converted_vol = { #NEWLINE# #INDENT# 'id' : 'id1' , #NEWLINE# 'size' : 1024 , #NEWLINE# 'display_name' : 'display_name' , #NEWLINE# 'display_description' : 'display_description' , #NEWLINE# 'availability_zone' : 'availability_zone' , #NEWLINE# 'volume_type' : 'volume_type' , #NEWLINE# 'bootable' : True , #NEWLINE# 'project_id' : 'tenant_id' , #NEWLINE# 'path' : None , #NEWLINE# 'host' : None , #NEWLINE# 'device' : 'sdb' , #NEWLINE# 'metadata' : { #NEWLINE# #INDENT# 'data' : 'data' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'volume_image_metadata' : { #NEWLINE# #INDENT# 'image_id' : 'id' , #NEWLINE# 'checksum' : 'checksum' , #NEWLINE# 'image_name' : 'name' , #NEWLINE# 'size' : 1024 , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# vol = self . cinder_client . convert_volume ( vol , mock . Mock ( ) , self . fake_cloud ) #NEWLINE# self . assertEqual ( converted_vol , vol )