Ensure the content type is correctly installed.

    >>> portal = layer['portal']
    >>> 'File' in portal.portal_types.objectIds()
    True
    >>> 'File' in portal.portal_factory.getFactoryTypes()
    True

Test creation

    >>> from plone.app.testing import TEST_USER_ID
    >>> from plone.app.testing import setRoles
    >>> setRoles(portal, TEST_USER_ID, ['Contributor',])
    >>> portal.invokeFactory('File', 'file1')
    'file1'
    >>> 'file1' in portal.objectIds()
    True
    >>> file1 = portal['file1']

Test interface(s)

    >>> from ftw.file.interfaces import IFile
    >>> IFile.providedBy(file1)
    True

Test SearchableText

    >>> portal.invokeFactory('File', 'file2', title='foo', file='bar')
    'file2'
    >>> file2 = portal['file2']
    >>> text = file2.SearchableText()
    >>> 'foo' in text
    True
    >>> 'bar' in text
    True

