def test_inline_image_that_does_exist(): inline_image = InlineImageFactory.create() result = kanisa_markdown("hello ![%s headline]" % inline_image.slug) assert '<p>hello <img src="' in result expected_classes = ' '.join([ 'img-thumbnail', 'inline-image-base', 'inline-image-headline', ]) tail = ('alt="" class="%s" height="200px" width="960px" /></p>' % expected_classes) assert tail in result
def test_inline_image_that_does_exist(): inline_image = InlineImageFactory.create() result = kanisa_markdown("hello ![%s headline]" % inline_image.slug) assert '<p>hello <img src="' in result expected_classes = ' '.join([ 'img-thumbnail', 'inline-image-base', 'inline-image-headline', ]) tail = ('alt="" class="%s" height="200px" width="960px" /></p>' % expected_classes) assert tail in result
def test_inline_image_that_does_not_exist(): result = kanisa_markdown("hello ![img-99 headline]") assert result == '<p>hello ![img-99 headline]</p>'
def test_newlines(): result = kanisa_markdown("hello\nworld") assert ws_remove(result) == '<p>hello<br/>world</p>' result = kanisa_markdown("hello\n\nworld") assert ws_remove(result) == '<p>hello</p><p>world</p>'
def test_basic_markup(): assert kanisa_markdown("hello") == '<p>hello</p>'
def test_newlines(self): self.assertHTMLEqual(kanisa_markdown("hello\nworld"), '<p>hello<br>world</p>') self.assertHTMLEqual(kanisa_markdown("hello\n\nworld"), '<p>hello</p><p>world</p>')
def test_basic(self): self.assertHTMLEqual(kanisa_markdown("hello"), '<p>hello</p>')
def test_inline_image_that_does_not_exist(self): self.assertHTMLEqual(kanisa_markdown("hello ![img-99 headline]"), '<p>hello ![img-99 headline]</p>')
def test_basic(self): self.assertHTMLEqual(kanisa_markdown("hello"), '<p>hello</p>')
def test_inline_image_that_does_not_exist(self): self.assertHTMLEqual(kanisa_markdown("hello ![img-99 headline]"), '<p>hello ![img-99 headline]</p>')
def test_newlines(self): self.assertHTMLEqual(kanisa_markdown("hello\nworld"), '<p>hello<br>world</p>') self.assertHTMLEqual(kanisa_markdown("hello\n\nworld"), '<p>hello</p><p>world</p>')
def item_description(self, item): return kanisa_markdown(item.full_text())
def test_inline_image_that_does_not_exist(): result = kanisa_markdown("hello ![img-99 headline]") assert result == '<p>hello ![img-99 headline]</p>'
def test_newlines(): result = kanisa_markdown("hello\nworld") assert ws_remove(result) == '<p>hello<br/>world</p>' result = kanisa_markdown("hello\n\nworld") assert ws_remove(result) == '<p>hello</p><p>world</p>'
def test_basic_markup(): assert kanisa_markdown("hello") == '<p>hello</p>'