ImperialCollegeLondon / safedata_validator

Python tools to validate and publish datasets using the safedata metadata format.
https://safedata-validator.readthedocs.io/
MIT License
2 stars 4 forks source link

Extend testing to include zenodo and entry points #57

Open davidorme opened 1 year ago

davidorme commented 1 year ago

Not for release/3.0.0 but we should add tests for the behaviour of the zenodo and entry_point modules. Both of those are communicating with external resources - it isn't immediately clear to me what the way to mock that meaningfully in tests is.

See for example #56

jacobcook1995 commented 1 year ago

taxondb.py also completely lacks unit tests, which I think stems from the same issue (tricky mocking)

davidorme commented 8 months ago

Probably using this: https://requests-mock.readthedocs.io/en/latest/mocker.html

davidorme commented 7 months ago

@jacobcook1995 I've created a branch and pushed a prototype fixture and test to it. I think we can adopt this after PR #115 to mock the communications with the GBIF and NCBI - although NCBI uses FTP now that I think about it. Damn.