Open jcampbell05 opened 4 months ago
Could you share an example of the code you're trying to make work?
resp = self.responses.add_callback(
responses.POST,
'http://example.com',
callback=fetch_invoice_pdf # Returns {}
)
assert resp.calls[0].request.body == {}
Currently resp will be None because add_callback returns None
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
Additional context
No response
Version of
responses
0.25.3
Steps to Reproduce
Expected Result
API returns response we can then use with assert
Actual Result
The api returns none so we can't assert against it