#NEWLINE# @ mock . patch . object ( vm_utils , '_import_migrate_ephemeral_disks' ) #NEWLINE# @ mock . patch . object ( vm_utils , '_import_migrated_root_disk' ) #NEWLINE# def test_import_all_migrated_disks_import_root_false( self , mock_root , mock_ephemeral ) : #NEWLINE# #INDENT# session = 'session' #NEWLINE# instance = 'instance' #NEWLINE# mock_root . return_value = 'root_vdi' #NEWLINE# mock_ephemeral . return_value = [ 'a' , 'b' ] #NEWLINE# result = vm_utils . import_all_migrated_disks ( session , instance , import_root = False ) #NEWLINE# expected = { #NEWLINE# #INDENT# 'root' : None , #NEWLINE# 'ephemerals' : [ 'a' , 'b' ] , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( expected , result ) #NEWLINE# self . assertEqual ( 0 , mock_root . call_count ) #NEWLINE# mock_ephemeral . assert_called_once_with ( session , instance )