CKEditor Uninstall
==================

    >>> app = layer['app']
    >>> portal = layer['portal']
    >>> from Products.CMFCore.utils import getToolByName
    >>> qi = getToolByName(portal, 'portal_quickinstaller')
    >>> qi.uninstallProducts(['collective.ckeditor'])


ckeditor properties
-------------------

ckeditor properties sheet must stay here after uninstall :

    >>> ptool = portal.portal_properties
    >>> 'ckeditor_properties' in ptool.objectIds()
    True

Control the wysiwyg_editor property in memberdata
-------------------------------------------------

    >>> memberdata = portal.portal_memberdata
    >>> memberdata.wysiwyg_editor
    ''    
    
Control the wysiwyg_editor property in site_properties
------------------------------------------------------

    >>> site_props = ptool.site_properties
    >>> 'CKeditor' in site_props.available_editors
    False

Control the default_editor property in site_properties
------------------------------------------------------

   >>> 'CKeditor' == site_props.default_editor
    False

Control portal_transforms uninstalls
------------------------------------

    >>> transforms = getToolByName(portal, 'portal_transforms')
    >>> output_mimetype = 'text/x-html-safe'
    >>> cke_transform = 'ck_ruid_to_url'

Control if cke_transform is removed

    >>> cke_transform in transforms.objectIds()
    False

Control if ckeditor policies are removed
    >>> tpolicies = transforms.listPolicies()
    >>> mimetype_registered = False
    >>> for p in tpolicies :
    ...     out_type = p[0]
    ...     if out_type == output_mimetype :
    ...         policies = p[1]
    ...         if cke_transform in policies :
    ...             mimetype_registered = True
    ...             break
    >>> mimetype_registered
    False
