Exemplo n.º 1
0
def test_remove():
    ce = ComposedElement()
    be = BaseElement("Test", "TestDesc", "category")
    ce.addElement(be)

    assert be == ce.getElement("Test")
    ce.removeElement("Test")
    assert (ce.getElement("Test") is None)
Exemplo n.º 2
0
def test_addElement():
    ce = ComposedElement()
    be = BaseElement("Test", "TestDesc", "category")
    ce.addElement(be)
    assert be == ce.getElement("Test")