def test_query_check2 (self) : r = "<xml>" + str2 + "</xml>" vv = xml_split_roots(r) d = vv[0] q = vv[1] p = xml_query_check(d, q) #Returns true if d == q self.assert_(p == "checked_query")
def test_det_kickoff2 (self) : r = "<xml>" + str2 + "</xml>" vv = xml_split_roots(r) d = vv[0] q = vv[1] p = xml_det_kickoff(d, q) #Returns data element of successful kickoff function self.assert_(p == d)
def test_depth_search2 (self) : r = "<xml>" + str2 + "</xml>" vv = xml_split_roots(r) d = vv[0] q = vv[1] p = xml_depth_search(d, q) #Returns true if parses through children and grandchildren of parent self.assert_(p == True)
def test_get_subelements2(self): r = "<xml>" + str2 + "</xml>" vv = xml_split_roots(r) d = vv[0] q = vv[1] p = xml_get_subelements(d, q) #Returns true after the program has searched the tree self.assert_(p == True)
def test_data_query1 (self): r = "<xml>" + str1 + "</xml>" vv = xml_split_roots(r) v = xml_data_query(vv) #Returns query root element self.assert_(v.tag == "Team")
def test_split_roots2(self): x = "<xml>" + str2 + "</xml>" v = xml_split_roots(x) self.assert_(v[0].tag == "THU") self.assert_(v[1].tag == "Team")