#NEWLINE# @ mock . patch ( 'nova.virt.images.fetch_to_raw' ) #NEWLINE# def test_fetch_image( self , mock_images ) : #NEWLINE# #INDENT# context = 'opaque context' #NEWLINE# target = '/tmp/targetfile' #NEWLINE# image_id = '4' #NEWLINE# user_id = 'fake' #NEWLINE# project_id = 'fake' #NEWLINE# libvirt_utils . fetch_image ( context , target , image_id , user_id , project_id ) #NEWLINE# mock_images . assert_called_once_with ( context , image_id , target , user_id , project_id , max_size = 0 )