#NEWLINE# def test_create_body_volume_defaults( self ) : #NEWLINE# #INDENT# mgr = self . client . _manager #NEWLINE# size = random . randint ( 100 , 1024 ) #NEWLINE# name = utils . random_unicode ( ) #NEWLINE# snapshot_id = utils . random_unicode ( ) #NEWLINE# clone_id = utils . random_unicode ( ) #NEWLINE# display_description = utils . random_unicode ( ) #NEWLINE# volume_type = utils . random_unicode ( ) #NEWLINE# metadata = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# availability_zone = utils . random_unicode ( ) #NEWLINE# fake_body = { #NEWLINE# #INDENT# 'volume' : { #NEWLINE# #INDENT# 'size' : size , #NEWLINE# 'snapshot_id' : snapshot_id , #NEWLINE# 'source_volid' : clone_id , #NEWLINE# 'display_name' : name , #NEWLINE# 'display_description' : display_description , #NEWLINE# 'volume_type' : volume_type , #NEWLINE# 'metadata' : metadata , #NEWLINE# 'availability_zone' : availability_zone , #NEWLINE# 'imageRef' : None , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# ret = mgr . _create_body ( name = name , size = size , volume_type = volume_type , description = display_description , metadata = metadata , snapshot_id = snapshot_id , clone_id = clone_id , availability_zone = availability_zone ) #NEWLINE# self . assertEqual ( ret , fake_body )