#NEWLINE# @ mock . patch . object ( images , 'get_image_properties' , autospec = True ) #NEWLINE# @ mock . patch . object ( glance_utils , 'is_glance_image' , autospec = True ) #NEWLINE# def test_is_whole_disk_image_whole_disk_non_glance( self , mock_igi , mock_gip ) : #NEWLINE# #INDENT# mock_igi . return_value = False #NEWLINE# instance_info = { #NEWLINE# #INDENT# 'image_source' : 'whole_disk_image' , #NEWLINE# #UNINDENT# } #NEWLINE# is_whole_disk_image = images . is_whole_disk_image ( 'context' , instance_info ) #NEWLINE# self . assertTrue ( is_whole_disk_image ) #NEWLINE# self . assertFalse ( mock_gip . called ) #NEWLINE# mock_igi . assert_called_once_with ( mock_gip [ 'image_source' ] )