Commits

Ali Afshar committed e12ce2f

basic project tests

  • Participants
  • Parent commits d607c1f

Comments (0)

Files changed (1)

File tests/model/test_project.py

     p = Project()
     assert p.tree.tag == 'interface'
     assert len(p.tree) == 0
-    assert p.dump == '<interface/>'
+    assert p.dump() == '<interface/>'
 
 def test_simple_project():
     e = Element('interface')
     assert p.tree.tag == 'interface'
     assert len(p.tree) == 0
     assert p.tree is e
-    assert p.dump == '<interface/>'
+    assert p.dump() == '<interface/>'
 
 def test_project_add_entity_noparent():
     p = Project()
     e = Element('object', **{'class':'GtkWindow'})
+    p.add_entity(e)
+    assert len(p.tree) == 1
+    print p.dump()
+    assert p.dump() == '<interface><object class="GtkWindow"/></interface>'