def test_pubmedstub_bad_pmid(): # invalid pubmed id wdid = PubmedItem(999999999).get_or_create(login='******') assert wdid is None
def test_get_pmc_item(): # only has a pmc id qid = PubmedItem("PMC3425984", id_type='PMC').get_or_create() assert qid == "Q42758027"
def test_get_pubmed_item_cache(): # this one exists wdid = PubmedItem(1234).get_or_create() assert ('1234', 'MED') in PubmedItem._cache assert PubmedItem._cache[('1234', 'MED')] == "Q27442302"
def test_get_pubmed_item(): # this one exists wdid = PubmedItem(1234).get_or_create() assert wdid == "Q27442302"