def add_post(self, title, markup='', comments_allowed=None, visible=None,
        tags='', categories=[]):
        data=dict(
            title=title,
            markup=markup,
            tags=tags,
            action='Publish',
        )
        if comments_allowed is not None: 
            data['comments_allowed'] = True
        if visible is not None: 
            data['visible'] = True
        # Mimic select form fields
        for i, category_id in enumerate(categories):
            data['category-%d' % i] = category_id
        return self.client.post('/compose', data=data, follow_redirects=True)
Helper functions to create a blog post
dataset/ETHPy150Open eugenkiss/Simblin/test/test_views.py/ViewTestCase.add_post