Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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'
Esempio n. 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)
Esempio n. 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
Esempio n. 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
Esempio n. 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'
Esempio n. 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