Additional Custom Matchers For requests_mock Mocking In Python
How to return request-aware responses from your mocked URLs
Published in
3 min readOct 25, 2023
A while back I had some tests that needed different responses to the same URLs, where the functionality being tested was deterministic when it came to the order in which the requests were being made. This time, however, I’ve run into a more complex problem — a similar scenario, but the requests from the function being tested can be made in any order.