def test_parseSingleXml(self): root = xml.xmlConvDict( os.path.dirname(__file__) + '/../data/pubmedMedline/singleTest.xml') result = medline.parseSingleArticle( root[u'MedlineCitationSet'][u'MedlineCitation']) self.assertEqual(result['PMID'], '13189540') self.assertEqual( result['ArticleTitle'], '[The lupus of the lip in a three and a half year old child].')
def test_xmlConvDict(self): xmlPath = xml.listXmlPath('../data/') for index, url in enumerate(xmlPath): conv = xml.xmlConvDict(url) self.assertEqual(type(conv), dict)
def test_parseSingleXml(self): root = xml.xmlConvDict(os.path.dirname(__file__) + '/../data/pubmedMedline/singleTest.xml') result = medline.parseSingleArticle(root[u'MedlineCitationSet'][u'MedlineCitation']) self.assertEqual(result['PMID'], '13189540') self.assertEqual(result['ArticleTitle'], '[The lupus of the lip in a three and a half year old child].')