Closed dowski closed 4 years ago
Thanks for the first round of review!
Thank you very much for the thoughtful pull request. I am merging into my dev branch and then I will increment the version (actually going to bump to 1.0 since I think it's pretty stable) and release.
My pleasure! Thanks for the useful library!
When the
statsapi.get
method encounters a response code other than 200 or 201 it will raise arequests.exceptions.HTTPError
. Previously it would raise aValueError
.This should allow client code to more easily retry transient HTTP errors automatically.
This is an API change, so let me know if you'd like me to bump the version number too, or if you'd rather do that next time you release.
It also adds a test dependency on the
responses
library for setting up fake HTTP responses forrequests
. I think it more thorough exercises the code vs. mockingrequests
in this case and asserting thatraise_for_status
was called on the response. Let me know if you have any concerns about another test dependency though.This is to resolve issue #46.