def test_paragraphs(self): result = lorem_ipsum.paragraphs(separator='|') assert len(result.split('|')) == 2 result = lorem_ipsum.paragraphs(as_list=True) assert len(result) == 2 result = lorem_ipsum.paragraphs(html=True, as_list=True) for paragraph in result: assert paragraph.startswith('<p>') assert paragraph.endswith('</p>')
def edit_posts(self, post_id): body = paragraphs() header = sentences() img_path = "tactical_gif@/home/deepak/Pictures/tactification/" + str( post_id) + ".png" self.tactification_edit_post(post_id, body, header, img_path) return header
def add_posts(self, no_of_posts): for post in range(1, no_of_posts): body = paragraphs() header = sentences() img_path = "tactical_gif@/home/deepak/Pictures/tactification/" + str( post) + ".png" self.tactification_add_post(body, header, img_path)
def generate_fake_comment(self, count=1): from random import seed, sample from forgery_py.forgery.lorem_ipsum import paragraphs comments = [] seed() for i in range(count): length = sample(range(1, 1000), 1) comments.append(paragraphs()) return comments
def body(quantity=2, separator='\n\n', wrap_start='', wrap_end='', html=False, sentences_quantity=3, as_list=False): """Return random email text.""" return lorem_ipsum.paragraphs(quantity=quantity, separator=separator, wrap_start=wrap_start, wrap_end=wrap_end, html=html, sentences_quantity=sentences_quantity, as_list=as_list)