#NEWLINE# @ mock . patch ( 'nova.utils.execute' ) #NEWLINE# def test_create_image( self , mock_execute ) : #NEWLINE# #INDENT# libvirt_utils . create_image ( 'raw' , '/some/path' , '10G' ) #NEWLINE# libvirt_utils . create_image ( 'qcow2' , '/some/stuff' , '1234567891234' ) #NEWLINE# expected_args = [ ( ( 'qemu-img' , 'create' , '-f' , 'raw' , '/some/path' , '10G' ) , ) , ( ( 'qemu-img' , 'create' , '-f' , 'qcow2' , '/some/stuff' , '1234567891234' ) , ) ] #NEWLINE# self . assertEqual ( self , mock_execute . call_args_list )