openeo-python-client icon indicating copy to clipboard operation
openeo-python-client copied to clipboard

Alternative for httpretty?

Open soxofaan opened this issue 4 months ago • 2 comments

https://github.com/Open-EO/openeo-python-client/blob/8cafa081d6b463ae67d15ffb143027af0568991d/setup.py#L19-L24

the tests currently require httpretty, but

  • the project seems to be unmaintained: https://github.com/gabrielfalcao/HTTPretty/issues/482
  • it requires an upper constraint on urllib3 urllib3<2.3.0 https://github.com/gabrielfalcao/HTTPretty/issues/484, which has known security issue: https://github.com/Open-EO/openeo-python-client/security/dependabot/1

soxofaan avatar Sep 09 '25 11:09 soxofaan

a common alternative I encountered is https://github.com/getsentry/responses which is more actively maintained. And it claims to support testing of retries (which is not possible with the current requests_mock solution we are using)

soxofaan avatar Sep 09 '25 11:09 soxofaan

a common alternative I encountered is https://github.com/getsentry/responses which is more actively maintained. And it claims to support testing of retries (which is not possible with the current requests_mock solution we are using)

Yes, I've been using responses for that very reason. There are a couple of tests in openeo-geopyspark-driver wrt/ resilience that make use of it.

It's not a drop-in replacement for requests_mock as the API is a bit different.

bossie avatar Sep 09 '25 12:09 bossie