def test_journal(self): scraper = ScraperJhu() file = open(os.path.join(os.path.dirname(__file__), "data", "jhu_ajm.html")) page_text = file.read() file.close() current_issue_url = scraper.scrape_journal(page_text) expected_url = 'http://muse.jhu.edu/journals/american_journal_of_mathematics/toc/ajm.134.6.html' assert current_issue_url == expected_url
def test_article(self): scraper = ScraperJhu() file = open(os.path.join(os.path.dirname(__file__), "data", "jhu_ajm_article.html")) article = file.read() file.close() new_article = scraper.scrape_article(article) new_article['scraper'] == 'jhu' new_article['title'] == 'Disk counting on toric varieties via tropical curves' new_article['author_names'] == 'Takeo Nishinou', new_article['author_names']
def test_issue(self): scraper = ScraperJhu() file = open(os.path.join(os.path.dirname(__file__), "data", "jhu_ajm_issue.html")) page_text = file.read() file.close() article_list = scraper.scrape_issue(page_text)