-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug: add support for old and new Zenodo APIs (#375)
Allow the Zenodo downloader class to work both with the previous Zenodo API and the new API that is running since their migration to InvenioRDM on 2023-10-13. The downloader class `ZenodoRepository` determines which API version is interacting with and defines the download url and populate the registry based on that. Test if `ZenodoRepository` correctly supports both the old and new Zenodo APIs. Use `pytest-httpserver` to run a local server that returns API response that mimics the Zenodo ones. Define a `base_api_url` class attribute for `ZenodoRepository` so we can override it in tests.
- Loading branch information
1 parent
ddebf17
commit 597cb02
Showing
4 changed files
with
232 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
pytest | ||
pytest-cov | ||
pytest-localftpserver | ||
pytest-httpserver | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters