#NEWLINE# @ mock . patch ( 'cloudbaseinit.utils.windows.storage.factory.get_storage_manager' ) #NEWLINE# @ mock . patch ( 'cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin._get_volumes_to_extend' ) #NEWLINE# def test_execute( self , mock_get_volumes_to_extend , mock_get_storage_manager ) : #NEWLINE# #INDENT# volumes_indexes = [ 1 , 3 ] #NEWLINE# mock_get_volumes_to_extend . return_value = volumes_indexes #NEWLINE# storage_manager = mock . Mock ( ) #NEWLINE# mock_get_storage_manager . return_value = volumes_indexes #NEWLINE# response = self . _extend_volumes . execute ( mock . Mock ( ) , mock . Mock ( ) ) #NEWLINE# mock_get_volumes_to_extend . assert_called_once_with ( ) #NEWLINE# mock_get_storage_manager . assert_called_once_with ( ) #NEWLINE# storage_manager . extend_volumes . assert_called_once_with ( volumes_indexes ) #NEWLINE# self . assertEqual ( ( base . PLUGIN_EXECUTE_ON_NEXT_BOOT , False ) , response )