responses icon indicating copy to clipboard operation
responses copied to clipboard

A utility for mocking out the Python Requests library.

Results 39 responses issues
Sort by recently updated
recently updated
newest added

Fixes issue #734 Adds a keyword parameter `method_or_response` to the `add(...)` method. The new keyword parameter is added as the last keyword parameter so that existing code that treats the...

This is awesome feature, and I started using it right away. But, it's tedious to have separate code for creating responses. So, I'm using following plugin: It allows to run...

enhancement

### Describe the bug As you can see in https://github.com/getsentry/responses/blob/b68e51388e08399a8828633910eac49d6fd35e2b/responses/__init__.py#L1067 responses, is modifying PreparedRequest instances to incorporate additional attributes. This is fine in the context of responses, this is not...

_recorder._remove_default_headers() does a case-sensitive check for HTTP header field names are case insensitive. The result is that for example, a lower-case 'content-type' field will not be removed. Later, when _add_from_file...

It's just a little pain point, but `.add()` uses `method` while `.upsert()` uses `method_or_response` for the HTTP method parameter name. Both can use the same actual values, but the formal...

enhancement

A somewhat naive fix for the global assert_all_requests_are_fired. Tests are passing locally on 3.12.

### Describe the bug When decorating a function with recorder, nothing gets recorded if an exception is thrown in the function. ### Additional context _No response_ ### Version of `responses`...

bug

### Describe the bug When a `RequestsMock()` is used as a context manager, `assert_all_requests_are_fired` is defaulted to True and an exception is raised at the end of the context block...

### Describe the bug I am probably looking in the wrong place, but I am failing to find documentation on what to do when a matcher fails to match. I...

question

Should we consider deprecating the `content_type` argument? It appears redundant in conjunction with the `headers` argument. Common tools like cURL and libraries such as `requests` do not provide a specific...