Example #1
0
    def test_bug_article_without_medline_journal_country(self, get_url):
        url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi/?db=pubmed&id=10838360&retmode=xml'
        response = get_url(url)

        record = parse_record(response)

        assert record.get('country') is None
Example #2
0
    def test_bug_article_without_vernacular_title(self, get_url):
        url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi/?db=pubmed&id=27305424&retmode=xml'
        response = get_url(url)

        record = parse_record(response)

        assert record.get('article_vernacular_title') is None
Example #3
0
    def test_bug_abstracttext_without_text(self, get_url):
        url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi/?db=pubmed&id=22078490&retmode=xml'
        response = get_url(url)

        record = parse_record(response)

        assert record['article_abstract'] is not None
Example #4
0
    def test_bug_article_with_multiple_languages_pick_first_one(self, get_url):
        url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi/?db=pubmed&id=19082263&retmode=xml'
        response = get_url(url)

        record = parse_record(response)

        assert record['article_language'] == 'eng'
Example #5
0
    def test_article_date_corectly_parsed(self, get_url):
        url = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi/?db=pubmed&id=24165173&retmode=xml'
        response = get_url(url)

        record = parse_record(response)

        assert record.get('article_date') == datetime.date(2013, 10, 28)
Example #6
0
    def test_bug_article_without_vernacular_title(self, get_url):
        url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi/?db=pubmed&id=27305424&retmode=xml'
        response = get_url(url)

        record = parse_record(response)

        assert record.get('article_vernacular_title') is None
Example #7
0
    def test_bug_article_without_medline_journal_country(self, get_url):
        url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi/?db=pubmed&id=10838360&retmode=xml'
        response = get_url(url)

        record = parse_record(response)

        assert record.get('country') is None
Example #8
0
    def test_bug_article_with_multiple_languages_pick_first_one(self, get_url):
        url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi/?db=pubmed&id=19082263&retmode=xml'
        response = get_url(url)

        record = parse_record(response)

        assert record['article_language'] == 'eng'
Example #9
0
    def test_bug_abstracttext_without_text(self, get_url):
        url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi/?db=pubmed&id=22078490&retmode=xml'
        response = get_url(url)

        record = parse_record(response)

        assert record['article_abstract'] is not None