From 723df60cc1ad83cf33f77bb79633b55faa92b4f3 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 30 May 2021 15:47:32 +0100 Subject: Add IACR provider (partially addresses #104) --- tests/test_providers.py | 22 ++++++++++++++++++++++ tests/test_ui.py | 11 +++++++++++ 2 files changed, 33 insertions(+) (limited to 'tests') diff --git a/tests/test_providers.py b/tests/test_providers.py index 1c1e1e6..2e112e0 100644 --- a/tests/test_providers.py +++ b/tests/test_providers.py @@ -22,6 +22,7 @@ from paper2remarkable.providers import ( CVF, CiteSeerX, HTML, + IACR, JMLR, LocalFile, Nature, @@ -478,6 +479,27 @@ class TestProviders(unittest.TestCase): with pdf.open_outline() as outline: assert len(outline.root) > 0 + def test_iacr_1(self): + prov = IACR(upload=False, verbose=VERBOSE) + url = "https://eprint.iacr.org/2021/489" + exp = "Xu_et_al_-_ROSE_Robust_Searchable_Encryption_With_Forward_and_Backward_Security_and_Practical_Performance_2021.pdf" + filename = prov.run(url) + self.assertEqual(exp, os.path.basename(filename)) + + def test_iacr_2(self): + prov = IACR(upload=False, verbose=VERBOSE) + url = "https://eprint.iacr.org/2007/474.pdf" + exp = "Cochran_-_Notes_on_the_Wang_Et_Al._2_63_SHA-1_Differential_Path_2007.pdf" + filename = prov.run(url) + self.assertEqual(exp, os.path.basename(filename)) + + def test_iacr_3(self): + prov = IACR(upload=False, verbose=VERBOSE) + url = "http://eprint.iacr.org/1996/008" + exp = "Naor_Wool_-_Access_Control_and_Signatures_via_Quorum_Secret_Sharing_1996.pdf" + filename = prov.run(url) + self.assertEqual(exp, os.path.basename(filename)) + if __name__ == "__main__": unittest.main() diff --git a/tests/test_ui.py b/tests/test_ui.py index 86a3c8e..6dfdaa6 100644 --- a/tests/test_ui.py +++ b/tests/test_ui.py @@ -23,6 +23,7 @@ from paper2remarkable.providers import ( CiteSeerX, CVF, HTML, + IACR, JMLR, LocalFile, Nature, @@ -113,6 +114,16 @@ class TestUI(unittest.TestCase): "https://publications.aston.ac.uk/id/eprint/38334/1/5th_Artificial_Neural_Networks.pdf", "https://publications.aston.ac.uk/id/eprint/38334/1/5th_Artificial_Neural_Networks.pdf", ), + ( + IACR, + "https://eprint.iacr.org/1999/011", + "https://eprint.iacr.org/1999/011", + ), + ( + IACR, + "https://eprint.iacr.org/2021/685.pdf", + "https://eprint.iacr.org/2021/685.pdf", + ), ( JMLR, "https://www.jmlr.org/papers/volume17/14-526/14-526.pdf", -- cgit v1.2.3