Example #1
0
def test_textile():
    p = DummyPage("textile", "h1. test\n\n")
    t = format(p)
    print t
    assert "<h1>test</h1>" in t
    assert "<html" not in t
    assert "<body" not in t
Example #2
0
def test_unknown():
    p = DummyPage("aoeuaoeu", "<>&")
    assert format(p) == "<code><pre>&lt;&gt;&nbsp;</pre></code>"
Example #3
0
def test_rst():
    p = DummyPage("rest", "h1\n==\n")
    t = format(p)
    assert '<h1 class="title">h1</h1>' in t
    assert "<html" not in t
    assert "<body" not in t
Example #4
0
def test_markdown():
    p = DummyPage("mdown", "# h1\n\nparagraph")
    t = format(p)
    assert "<h1>h1</h1>" in t
    assert "<html" not in t
    assert "<body" not in t