Exemplo n.º 1
0
def test_get_node_text3():
    """
    should return node text
    """
    node = parseString("<outer>one</outer>")
    text_node = node.childNodes[0]

    assert xml.get_node_text(text_node) == "one"
Exemplo n.º 2
0
def test_get_node_text2():
    """
    should return empty string for a node with no child nodes.
    """
    assert xml.get_node_text(Document()) == ""