diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-10-27 22:50:35 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-10-27 22:50:35 +0100 |
| commit | 244d0f51eb01086ff008c355cff8dba32eb58843 (patch) | |
| tree | ec087aee1cb0edf8a67733482c27085fbc29cb48 /tests/test_providers.py | |
| parent | Use a cookiejar instead of empty dict (diff) | |
| download | paper2remarkable-244d0f51eb01086ff008c355cff8dba32eb58843.tar.gz paper2remarkable-244d0f51eb01086ff008c355cff8dba32eb58843.zip | |
Add provider for Nature
Diffstat (limited to 'tests/test_providers.py')
| -rw-r--r-- | tests/test_providers.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_providers.py b/tests/test_providers.py index e701234..def77d0 100644 --- a/tests/test_providers.py +++ b/tests/test_providers.py @@ -20,6 +20,7 @@ from paper2remarkable.providers import ( HTML, JMLR, LocalFile, + Nature, NBER, NeurIPS, OpenReview, @@ -355,6 +356,20 @@ class TestProviders(unittest.TestCase): filename = prov.run(url) self.assertEqual(exp, os.path.basename(filename)) + def test_nature_1(self): + prov = Nature(upload=False, verbose=VERBOSE) + url = "https://www.nature.com/articles/s41598-020-75456-0" + exp = "Golozar_et_al_-_Direct_Observation_of_Lithium_Metal_Dendrites_With_Ceramic_Solid_Electrolyte_2020.pdf" + filename = prov.run(url) + self.assertEqual(exp, os.path.basename(filename)) + + def test_nature_2(self): + prov = Nature(upload=False, verbose=VERBOSE) + url = "https://www.nature.com/articles/s41599-019-0371-1.pdf" + exp = "Leroi_et_al_-_On_Revolutions_2020.pdf" + filename = prov.run(url) + self.assertEqual(exp, os.path.basename(filename)) + if __name__ == "__main__": unittest.main() |
