def test_gbxml_set_text(self): g=Gbxml() e=g.add_element(g.root(),'Campus') e=g.add_element(e,'Name') e=g.set_text(e,'MyCampus') st=e.text check='MyCampus' self.assertEqual(st,check)
def test_gbxml_add_zone(self): g=Gbxml() campus=g.add_element(g.root(),'Campus') building=g.add_element(campus,'Building') space=g.add_element(building,'Space') space.set('id','space-1') g.add_zone('zone-1','space-1') l=g.elements('Zone') check=1 self.assertEqual(len(l),check) st=space.get('zoneIdRef') check='zone-1' self.assertEqual(st,check)
def test_gbxml_add_element(self): g=Gbxml() g.add_element(g.root(),'Campus') n=len(g.elements()) check=2 self.assertEqual(n,check)