예제 #1
0
 def test_pmid_init1(self):
     """
     A pubmed uri doesn't work
     """
     uri = 'http://www.ncbi.nlm.nih.gov/pubmed/24098140?dopt=abstract'
     doc = Document(pmid=uri)
     doc.update_from_pubmed()
     self.assertEqual([], list(doc.author()))
예제 #2
0
 def test_pmid_init2(self):
     """
     A pubmed id
     """
     pmid = "24098140"
     doc = Document(pmid=pmid)
     doc.update_from_pubmed()
     self.assertIn(u'Frédéric MY', list(doc.author()))
예제 #3
0
 def test_pubmed_init1(self):
     """
     A pubmed uri
     """
     uri = 'http://www.ncbi.nlm.nih.gov/pubmed/24098140?dopt=abstract'
     doc = Document(pubmed=uri)
     doc.update_from_pubmed()
     self.assertIn(u'Frédéric MY', list(doc.author()))
예제 #4
0
 def test_pmid_init2(self):
     """
     A pubmed id
     """
     pmid = "24098140"
     doc = Document(pmid=pmid)
     doc.update_from_pubmed()
     self.assertIn(u'Frédéric MY', list(doc.author()))
예제 #5
0
 def test_pmid_init1(self):
     """
     A pubmed uri doesn't work
     """
     uri = 'http://www.ncbi.nlm.nih.gov/pubmed/24098140?dopt=abstract'
     doc = Document(pmid=uri)
     doc.update_from_pubmed()
     self.assertEqual([], list(doc.author()))
예제 #6
0
 def test_pubmed_init1(self):
     """
     A pubmed uri
     """
     uri = 'http://www.ncbi.nlm.nih.gov/pubmed/24098140?dopt=abstract'
     doc = Document(pubmed=uri)
     doc.update_from_pubmed()
     self.assertIn(u'Frédéric MY', list(doc.author()))
예제 #7
0
 def test_pubmed_multiple_authors_list(self):
     """
     When multiple authors are on a paper, all of their names should be
     returned in an iterator. Publication order not necessarily preserved
     """
     pmid = "24098140"
     alist = [
         u"Frédéric MY", "Lundin VF", "Whiteside MD", "Cueva JG", "Tu DK",
         "Kang SY", "Singh H", "Baillie DL", "Hutter H", "Goodman MB",
         "Brinkman FS", "Leroux MR"
     ]
     doc = Document(pmid=pmid)
     doc.update_from_pubmed()
     self.assertEqual(set(alist), set(doc.author()))
예제 #8
0
 def test_pubmed_multiple_authors_list(self):
     """
     When multiple authors are on a paper, all of their names should be
     returned in an iterator. Publication order not necessarily preserved
     """
     pmid = "24098140"
     alist = [
         u"Frédéric MY",
         "Lundin VF",
         "Whiteside MD",
         "Cueva JG",
         "Tu DK",
         "Kang SY",
         "Singh H",
         "Baillie DL",
         "Hutter H",
         "Goodman MB",
         "Brinkman FS",
         "Leroux MR"]
     doc = Document(pmid=pmid)
     doc.update_from_pubmed()
     self.assertEqual(set(alist), set(doc.author()))