parameters: (self)
docstring: Check conversion tool (oood) is available for erp5.
    This script convert an odt document into HTML and try to read
    the returned string and find out expected string
docstring_summary: Check conversion tool (oood) is available for erp5.
    This script convert an odt document into HTML and try to read
    the returned string and find out expected string
docstring_tokens: Check conversion tool ( oood ) is available for erp5 . This script convert an odt document into HTML and try to read the returned string and find out expected string
function: def checkConversionToolAvailability(self):
    """
    Check conversion tool (oood) is available for erp5.
    This script convert an odt document into HTML and try to read
    the returned string and find out expected string
    """
    portal = self.getPortalObject()
    document_id = 'P-ERP5-TEST.Conversion.Tool.Availability-001-en.odt'
    document_path = 'portal_skins/erp5_administration/%s' % (document_id,)
    document_file = portal.restrictedTraverse(document_path)
  
    message = None
    severity = 0
  
    try:
      temp_document = self.newContent(
        portal_type='OOo Document',
        temp_object=True,
        id=document_id,
        data=document_file.data,
        source_reference=document_id)
      temp_document.convertToBaseFormat()
      _, html_result = temp_document.convert(format='html')
    except ConflictError:
      raise
    except Exception:
      #Transformation failed
      message = 'Conversion tool got unexpected error:\n%s' % ''.join(ExceptionFormatter.format_exception(*sys.exc_info()))
    else:
      #Everything goes fine, Check that expected string is present in HTML conversion
      if 'AZERTYUIOPMQ' not in html_result:
        message = 'Conversion to HTML Failed:\n%s' % (html_result,)
  
    active_process = self.newActiveProcess()
    result = ActiveResult()
    if message:
      severity = 1
      result.edit(detail=message)
    result.edit(severity=severity)
    active_process.postResult(result)
function_tokens: def checkConversionToolAvailability ( self ) : portal = self . getPortalObject ( ) document_id = 'P-ERP5-TEST.Conversion.Tool.Availability-001-en.odt' document_path = 'portal_skins/erp5_administration/%s' % ( document_id , ) document_file = portal . restrictedTraverse ( document_path ) message = None severity = 0 try : temp_document = self . newContent ( portal_type = 'OOo Document' , temp_object = True , id = document_id , data = document_file . data , source_reference = document_id ) temp_document . convertToBaseFormat ( ) _ , html_result = temp_document . convert ( format = 'html' ) except ConflictError : raise except Exception : #Transformation failed message = 'Conversion tool got unexpected error:\n%s' % '' . join ( ExceptionFormatter . format_exception ( * sys . exc_info ( ) ) ) else : #Everything goes fine, Check that expected string is present in HTML conversion if 'AZERTYUIOPMQ' not in html_result : message = 'Conversion to HTML Failed:\n%s' % ( html_result , ) active_process = self . newActiveProcess ( ) result = ActiveResult ( ) if message : severity = 1 result . edit ( detail = message ) result . edit ( severity = severity ) active_process . postResult ( result )