Skip to content

Commit

Permalink
Merge pull request #66 from Coleridge-Initiative/el3220/JSON_generic_…
Browse files Browse the repository at this point in the history
…parser

Minor Spelling Fix
  • Loading branch information
ceteri authored Apr 1, 2020
2 parents 8737146 + 5d8e595 commit 316e47d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion richcontext/scholapi/scholapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@ def journal(self):

class _ScholInfraResponse_PubMed(_ScholInfraResponse):

def pdmid(self):
def pmid(self):
return self.meta.get("MedlineCitation", {}).get("PMID", {}).get("#text") if self.meta else None


Expand Down
6 changes: 3 additions & 3 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_pubmed_title_search (self):
if source.has_credentials():
response = source.title_search(title)
source.report_perf(response.timing)
self.assertTrue(response.pdmid() == expected)
self.assertTrue(response.pmid() == expected)
self.assertTrue(response.doi() == doi)
self.assertTrue(response.title() == title)
self.assertTrue(response.journal() == journal)
Expand All @@ -62,7 +62,7 @@ def test_pubmed_title_search (self):
response = source.title_search(title)
source.report_perf(response.timing)
self.assertTrue(response.meta is None)
self.assertTrue(response.pdmid() is None)
self.assertTrue(response.pmid() is None)
self.assertTrue(response.doi() is None)
self.assertTrue(response.title() is None)
self.assertTrue(response.journal() is None)
Expand All @@ -79,7 +79,7 @@ def test_pubmed_journal_lookup (self):
if source.has_credentials():
response = source.journal_lookup(issn)
source.report_perf(response.timing)
self.assertTrue(response.pdmid() == None)
self.assertTrue(response.pmid() == None)
self.assertTrue(response.doi() == None)
self.assertTrue(response.title() == None)
self.assertTrue(response.journal().lower() == expected)
Expand Down

0 comments on commit 316e47d

Please sign in to comment.