Ejemplo n.º 1
0
def test_pretty():
    from kemmering.html import doc, html, head, pretty, title
    assert pretty(doc(html()(head()(
        title()('foo'))))) == ("<!DOCTYPE html>\n"
                               "<html>\n"
                               "  <head>\n"
                               "    <title>foo</title>\n"
                               "  </head>\n"
                               "</html>\n")
Ejemplo n.º 2
0
def test_pretty():
    from kemmering.html import doc, html, head, pretty, title
    assert pretty(doc(html()(head()(title()('foo'))))) == (
        "<!DOCTYPE html>\n"
        "<html>\n"
        "  <head>\n"
        "    <title>foo</title>\n"
        "  </head>\n"
        "</html>\n"
    )
Ejemplo n.º 3
0
def test_title():
    from kemmering.html import title
    assert str(title()('foo')) == '<title>foo</title>'
Ejemplo n.º 4
0
def test_doc():
    from kemmering.html import doc, html, head, title
    assert str(doc(html()(head()(title()('foo'))))) == (
        "<!DOCTYPE html>\n\n"
        "<html><head><title>foo</title></head></html>"
    )
Ejemplo n.º 5
0
def test_title():
    from kemmering.html import title
    assert str(title()('foo')) == '<title>foo</title>'
Ejemplo n.º 6
0
def test_doc():
    from kemmering.html import doc, html, head, title
    assert str(doc(html()(head()(
        title()('foo'))))) == ("<!DOCTYPE html>\n\n"
                               "<html><head><title>foo</title></head></html>")