From 3531c62be471c1d40fe94d256e7448626e3fde40 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 19 Aug 2019 18:45:03 +0100 Subject: Add unit test for Springer Provider --- test.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'test.py') diff --git a/test.py b/test.py index e2c26af..83c74af 100644 --- a/test.py +++ b/test.py @@ -12,12 +12,13 @@ import shutil import os from arxiv2remarkable import ( - Arxiv, - Pubmed, ACM, - OpenReview, + Arxiv, LocalFile, + OpenReview, PdfUrl, + Pubmed, + Springer, ) VERBOSE = False @@ -77,6 +78,13 @@ class Tests(unittest.TestCase): filename = prov.run(url) self.assertEqual(exp_filename, os.path.basename(filename)) + def test_springer(self): + prov = Springer(upload=False, verbose=VERBOSE) + url = "https://link.springer.com/article/10.1007/s10618-019-00631-5" + exp_filename = "Mauw_Ramirez-Cruz_Trujillo-Rasua_-_Robust_Active_Attacks_on_Social_Graphs_2019.pdf" + filename = prov.run(url) + self.assertEqual(exp_filename, os.path.basename(filename)) + def test_local(self): local_filename = "test.pdf" with open(local_filename, "w") as fp: -- cgit v1.2.3