Make some imports
    >>> from Products.CMFPlone.utils import getToolByName
    >>> from zope.component import getMultiAdapter, getUtility
    >>> from plone.portlets.interfaces import IPortletManager
    >>> from plone.portlets.interfaces import IPortletAssignmentMapping

Add a Blog content item

    >>> self.setRoles(['Contributor'])
    >>> self.portal.invokeFactory('Blog', 'b1')
    'b1'
    >>> b1 = self.portal.get('b1')
    >>> b1.processForm()
    >>> b1
    <Blog at ...>

Now it should automaticly create the categories folder
    >>> cat_folder = b1.get('categories')
    >>> cat_folder
    <BlogCategory at ...>

and also some portlets must be set autmaticly on the blog
    >>> portlet_manager = getUtility(IPortletManager,name='plone.rightcolumn',context=b1)
    >>> portlet_manager['content_type']['Blog'].keys()
    [u'blog-categories', u'tagcloud', u'blog-archive']
    >>> portlet_manager['content_type']['BlogEntry'].keys()
    [u'blog-categories', u'tagcloud', u'blog-archive']
    >>> portlet_manager['content_type']['BlogCategory'].keys()
    [u'blog-categories', u'tagcloud', u'blog-archive']


add a blogentry
    >>> b1.invokeFactory('BlogEntry', 'BlogEntry1')
    'BlogEntry1'
    >>> BlogEntry1 = b1.get('BlogEntry1')
    >>> BlogEntry1.processForm()
    >>> BlogEntry1
    <BlogEntry at ...>

add a image in blogentry
    >>> BlogEntry1.invokeFactory('Image', 'testimg')
    'testimg'
    >>> testimg = BlogEntry1.get('testimg')
    >>> testimg
    <ATImage at ...>

add a image to content item
    >>> allowed_types = [ a.content_meta_type for a in b1.allowedContentTypes()]
    >>> 'Image' not in allowed_types
    True
