aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests/test_html.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests/test_html.py')
-rw-r--r--python/tests/test_html.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/python/tests/test_html.py b/python/tests/test_html.py
index 1caca15..614b802 100644
--- a/python/tests/test_html.py
+++ b/python/tests/test_html.py
@@ -7,7 +7,8 @@ def test_extract_fulltext_url():
assert resp == {}
resp = extract_fulltext_url(
- "http://dummy-site/", b"""<html>
+ "http://dummy-site/",
+ b"""<html>
<head>
<meta name="citation_pdf_url" content="http://www.example.com/content/271/20/11761.full.pdf">
</head>
@@ -15,14 +16,17 @@ def test_extract_fulltext_url():
<h1>my big article here</h1>
blah
</body>
- </html>""")
- assert resp['pdf_url'] == "http://www.example.com/content/271/20/11761.full.pdf"
- assert resp['technique'] == "citation_pdf_url"
+ </html>""",
+ )
+ assert resp["pdf_url"] == "http://www.example.com/content/271/20/11761.full.pdf"
+ assert resp["technique"] == "citation_pdf_url"
- with open('tests/files/plos_one_article.html', 'rb') as f:
+ with open("tests/files/plos_one_article.html", "rb") as f:
resp = extract_fulltext_url(
"https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0213978",
f.read(),
)
- assert resp[
- 'pdf_url'] == "https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0213978&type=printable"
+ assert (
+ resp["pdf_url"]
+ == "https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0213978&type=printable"
+ )