Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: difference with "responses" package #213

Open
beliaev-maksim opened this issue Sep 1, 2022 · 3 comments
Open

question: difference with "responses" package #213

beliaev-maksim opened this issue Sep 1, 2022 · 3 comments

Comments

@beliaev-maksim
Copy link

Hi guys,
I wanted to ask you what is the main difference between the current package and https://github.com/getsentry/responses ?

it looks like mocking is performed on the same. From the first glance libs look to be very similar

@soxofaan
Copy link
Contributor

same question here: getsentry/responses#182

@beliaev-maksim
Copy link
Author

same question here: getsentry/responses#182

that one is very old.

But comparing projects in 2022-2023 I do not see what requests-mock can do what responses cannot or a fundamental difference. Thus, I asked if authors can provide with some hints

@jamielennox
Copy link
Owner

jamielennox commented Feb 6, 2023

Both projects were launched around about the same time when at least for me httpretty was really the only option in python and there were some significant problems with it (like python3 support, inconsistencies etc). Had responses existed we may not have bothered with requests-mock but particularly in OpenStack at the time there was need to do (for example) specific failure testing that was difficult.

To my understanding they do a very similar thing, but I really haven't used responses.

Years ago when i last looked i found (IMO) that the way you matched requests, and the way you craft the response payload was much more flexible in requests-mock. I don't know if that's still true and at this point it's probably a matter of preference.

responses is a better name for a library, but requests-mock definitely gets the SEO boost :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants