Esempio n. 1
0
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
Esempio n. 2
0
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
Esempio n. 3
0
def test_inline_image_that_does_not_exist():
    result = kanisa_markdown("hello ![img-99 headline]")
    assert result == '<p>hello ![img-99 headline]</p>'
Esempio n. 4
0
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>'
Esempio n. 5
0
def test_basic_markup():
    assert kanisa_markdown("hello") == '<p>hello</p>'
Esempio n. 6
0
 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>')
Esempio n. 7
0
 def test_basic(self):
     self.assertHTMLEqual(kanisa_markdown("hello"), '<p>hello</p>')
Esempio n. 8
0
 def test_inline_image_that_does_not_exist(self):
     self.assertHTMLEqual(kanisa_markdown("hello ![img-99 headline]"),
                          '<p>hello ![img-99 headline]</p>')
Esempio n. 9
0
 def test_basic(self):
     self.assertHTMLEqual(kanisa_markdown("hello"),
                          '<p>hello</p>')
Esempio n. 10
0
 def test_inline_image_that_does_not_exist(self):
     self.assertHTMLEqual(kanisa_markdown("hello ![img-99 headline]"),
                          '<p>hello ![img-99 headline]</p>')
Esempio n. 11
0
 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>')
Esempio n. 12
0
 def item_description(self, item):
     return kanisa_markdown(item.full_text())
Esempio n. 13
0
def test_inline_image_that_does_not_exist():
    result = kanisa_markdown("hello ![img-99 headline]")
    assert result == '<p>hello ![img-99 headline]</p>'
Esempio n. 14
0
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>'
Esempio n. 15
0
def test_basic_markup():
    assert kanisa_markdown("hello") == '<p>hello</p>'