Example #1
0
def test_Tag_change_props():
    t = Tag()
    t.id = 1
    assert str(t) == '<div id="1"></div>'
    t.id = None
    assert str(t) == '<div></div>'
    t.cid = 1
    assert str(t) == '<div cid="1"></div>'
    t.cid = None
    assert str(t) == '<div></div>'
Example #2
0
def test_Tag_id():
    t = Tag()
    t.id = "nope"
    assert str(t) == '<div id="nope"></div>'