BookOps-CAT / bookops-worldcat

BookOps WorldCat Metadata API wrapper
https://bookops-cat.github.io/bookops-worldcat/
MIT License
35 stars 7 forks source link

Query updates #84

Closed charlottekostelic closed 7 months ago

charlottekostelic commented 7 months ago

Edited to reflect changes:

Added option for users to add automatic retries to requests

Somewhat related: there's an open enhancement request for requests asking to be able to refresh authentication header on retry. That functionality doesn't currently exist and it doesn't look like it's being worked on https://github.com/psf/requests/issues/5975

charlottekostelic commented 7 months ago

@charlottekostelic in the description you mention a removal of a test for a stale token from test_query but I don't see such changes in this PR. We should be testing for a stale token in this module since the check if it is still valid happens only here. Stale token tests were somewhat redundant in the test_metadata_api and it's OK to skip them there.

I removed the stale token test and that lowered the test coverage (the if session.authorization.is_expired() block) so I added it back in but forgot to update the description.

charlottekostelic commented 7 months ago

@klinga I made a few changes: