Exemple #1
0
def test_render_content_indent():
    """ does the render method work after appending a string """
    e = hr.Element("this is some content")
    e.append("and this is some more")

    output = render_element(e)
    lines = output.split('\n')
    print(lines)
    assert (lines[1].startswith("    "))
Exemple #2
0
def test_render_content1():
    """ does the render method work """
    e = hr.Element("this is some content")

    output = render_element(e)

    assert output.startswith('<html>')
    assert output.endswith('</html>\n')
    assert "this is some content" in output
Exemple #3
0
def test_render_content2():
    """ does the render method work after appending a string """
    e = hr.Element("this is some content")
    e.append("and this is some more")

    output = render_element(e)

    assert output.startswith('<html>')
    assert output.endswith('</html>\n')
    assert "this is some content" in output
    assert "and this is some more" in output
    print(output)
Exemple #4
0
def test_element_content():
    """ should be able to initilize with a string"""
    hr.Element("some content")
Exemple #5
0
def test_init_content():
    " can I even initialize an Element with content"

    hr.Element("this is some text")

    assert True
Exemple #6
0
def test_init():
    " can I even initialize an Element"
    hr.Element()
    assert True