#NEWLINE# @ mock . patch . object ( vm_utils , '_vdi_resize' ) #NEWLINE# @ mock . patch . object ( vm_utils , '_vdi_get_virtual_size' ) #NEWLINE# def test_update_vdi_virtual_size_works( self , mock_get_size , mock_resize ) : #NEWLINE# #INDENT# mock_get_size . return_value = ( ( 1024 ** 3 ) - 1 ) #NEWLINE# instance = { #NEWLINE# #INDENT# 'uuid' : 'a' , #NEWLINE# #UNINDENT# } #NEWLINE# vm_utils . update_vdi_virtual_size ( 's' , self , 'ref' , 1 ) #NEWLINE# mock_get_size . assert_called_once_with ( 's' , 'ref' ) #NEWLINE# mock_resize . assert_called_once_with ( 's' , 'ref' , ( 1024 ** 3 ) )