#NEWLINE# @ mock . patch . object ( vm_utils , 'get_ephemeral_disk_sizes' ) #NEWLINE# def test_import_migrate_ephemeral_disks_use_old_flavor( self , mock_get_sizes ) : #NEWLINE# #INDENT# mock_get_sizes . return_value = [ ] #NEWLINE# instance = objects . Instance ( id = 1 , uuid = uuidutils . generate_uuid ( ) , ephemeral_gb = 2000 ) #NEWLINE# instance . old_flavor = objects . Flavor ( ephemeral_gb = 4000 ) #NEWLINE# vm_utils . _import_migrate_ephemeral_disks ( 's' , instance ) #NEWLINE# mock_get_sizes . assert_called_once_with ( 4000 )