def test_export_org2(self): org_string = "<WC><Organization ID=\"ORG_ORGANIZE\" Name=\"ORGANIZE\"><Crises><Crisis ID=\"CRI_ORGANIZE\" /></Crises><People><Person ID=\"PER_ORGANIZE\" /><Person ID=\"PER_ORGANIZE\" /><Person ID=\"PER_ORGANIZE\" /><Person ID=\"PER_ORGANIZE\" /></People><Kind>ORGANIZE</Kind><Location>ORGANIZE</Location><Common></Common></Organization></WC>" check_string = org_string [4:-5] org_list = [] root8 = ET.fromstring(org_string) populate_org(root8, org_list) org_xml = export_organization(org_list[0]) self.assertEqual(check_string, org_xml)
def test_export_org0(self): org_string = "<WC><Organization ID=\"ORG_MUSBRO\" Name=\"The Muslim Brotherhood\"><Crises><Crisis ID=\"CRI_UEGYPT\" /></Crises><People><Person ID=\"PER_ELBARA\" /><Person ID=\"PER_HMUBAR\" /><Person ID=\"PER_RLAKAH\" /><Person ID=\"PER_MMORSI\" /></People><Kind>Islamic Movement</Kind><Location>Egypt</Location><Common></Common></Organization></WC>" org_list = [] root8 = ET.fromstring(org_string) populate_org(root8, org_list) org_xml = export_organization(org_list[0]) check_string = org_string [4:-5] self.assertEqual(check_string, org_xml)