responses
responses copied to clipboard
A utility for mocking out the Python Requests library.
### Describe the bug When using standard responses you can use the matching behaviour but the callback API doesn't currently allow you to assert any calls to this callback ###...
_recorder.record captures header 'content-encoding: gzip' but does not return gzip content on replay
### Describe the bug `headers` has been added to the recording file which may include `content-encoding`. When a recording with `content-encoding: gzip` is replayed an error is received: > urllib3.exceptions.DecodeError:...
### Describe the bug Hello, I think the definition here: https://github.com/getsentry/responses/blob/f7a7945991efc7cb8133b9d6ec75761b459fe75c/responses/__init__.py#L237 could be: ```python class CallList(Sequence[Call], Sized): ``` I'm using the latest Pyright static type checker in strict mode and...
### Describe the bug Hi, I am developing some python code utilizing mulipart/form-data headers for uploading a file. When I try to mock the endpoint response with the following code,...
### Describe the bug When mocking requests.head() a `ChunkedEncodingError` is raised if you send something in the header but omit `content-length` in said header. ### Additional context _No response_ ###...
### Describe the bug It would be great to be able to use capture groups in the Regexp and be able to read their value in the request passed to...
Related issue: #682 In addition, after our testing, this version can be compatible with the yaml format of the previous version.
### Describe the bug When recording the binary response (e.g. image), the response is broken when added from file again. ### Additional context _No response_ ### Version of `responses` 0.23.3...
closes #639 Current PR proposes the implementation of recorder for matchers into yaml (or any other compatible format)
For my project, I need to mock responses from an API where some of the parameters are included in a HTTP header, so for example I would make a request...