responses
responses copied to clipboard
A utility for mocking out the Python Requests library.
### Describe the bug In my pytests, I record responses with the fixture ```python import hashlib import pytest import responses from responses._recorder import recorder @pytest.fixture def mock_requests(request): fname = hashlib.sha256(request.node.nodeid.encode()).hexdigest()[:16]...
Now that more and more people are relying on aiohttp, it becomes more sense to support aiohttp. For now, I tried [aioresponses](https://github.com/pnuckowski/aioresponses) but it seems to be that a lot...
Currently the `matchers.json_param_matcher` does fail if the order within lists in the returned response differs. In order to check requests that are constructed from database queries, predicting the order of...
In some cases, I need to know if a response comes from the record. If I see correctly, there currently is no way to do that. [requests-cache](https://pypi.org/project/requests-cache/) does this by...
### Describe the bug My code verifies server responses to prevent man-in-the-middle attacks. The signed data also includes the `Date` header, which is not present in the record. Hence, all...
It looks like that CodeCov report and CI status does not appear on PRs from forks
### Describe the bug Calls not updated when using version 0.5.1 of pytest-responses. ### Additional context The workaround for this is to not use the pytest fixture. Works perfectly when...
The `add` method returns a `BaseResponse`, on which you can find calls using `calls`. The `add_callback` method doesn't. Users can get calls from the generic `RequestsMock` object, but that requires...
Thanks for taking the time to review this! I ran into this type mismatch with some code that leverages the requests library and was hoping to update responses to match....
### Describe the bug I have an edge case where I had to use BytesIO as the data for requests, in production environment, the IO is consumed after the first...