#NEWLINE# @ mock . patch . object ( disk_utils , 'get_image_mb' , return_value = 129 , autospec = True ) #NEWLINE# def test_deploy_partition_image_image_exceeds_root_partition( self , gim_mock ) : #NEWLINE# #INDENT# address = '127.0.0.1' #NEWLINE# port = 3306 #NEWLINE# iqn = 'iqn.xyz' #NEWLINE# lun = 1 #NEWLINE# image_path = '/tmp/xyz/image' #NEWLINE# root_mb = 128 #NEWLINE# swap_mb = 64 #NEWLINE# ephemeral_mb = 0 #NEWLINE# ephemeral_format = None #NEWLINE# node_uuid = '12345678-1234-1234-1234-1234567890abcxyz' #NEWLINE# self . assertRaises ( exception . InstanceDeployFailure , utils . deploy_partition_image , address , port , iqn , lun , image_path , root_mb , swap_mb , ephemeral_mb , ephemeral_format , node_uuid ) #NEWLINE# gim_mock . assert_called_once_with ( image_path )