def create_article(self,
                       title,
                       author,
                       category,
                       location,
                       image,
                       show_modular_content=False,
                       modular_content=None):
        if modular_content is not None:
            return ArticleFactory.create(
                title=title,
                authors=(author, ),
                categories=(category, ),
                locations=(location, ),
                featured_image=image,
                show_modular_content=show_modular_content,
                modular_content=modular_content)

        return ArticleFactory.create(title=title,
                                     authors=(author, ),
                                     categories=(category, ),
                                     locations=(location, ),
                                     featured_image=image,
                                     show_modular_content=show_modular_content)
Exemple #2
0
 def create_article(self, title, author, category, location, image):
     return ArticleFactory.create(title=title,
                                  authors=(author, ),
                                  categories=(category, ),
                                  locations=(location, ),
                                  featured_image=image)