getsentry / responses

A utility for mocking out the Python Requests library.
Apache License 2.0
4.08k stars 347 forks source link

raise_for_status() does not return the response #723

Open tuky opened 2 weeks ago

tuky commented 2 weeks ago

Describe the bug

Look at https://3.python-requests.org/user/quickstart/ to see, that this method actually return the response in case of no error for easy method chaining:

image

The mocked response however always return None breaking the code during testing.

Additional context

No response

Version of responses

0.25.3

Steps to Reproduce

response.raise_for_status().json()

Expected Result

the mocked response

Actual Result

None