You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a unittest that uses respx through the pytest fixture to mock the http requests. I changed something in the code, and now a bunch of tests are failing with respx.models.AllMockedAssertionError: RESPX: <Request('POST', 'https://our.partner.example.com/their/webhook')> not mocked!.
So far, hurray for unittests. But it doesn't show me what request was actually made. It would be great if there was some kind of output showing the mocked requests and the actual requests, so I can see the difference. Now i am just guessing what the issue is. Pytest normally can show diffs on assertion errors with plain values.
The text was updated successfully, but these errors were encountered:
The "all mocked assertion" means that respx is active and configured to require every httpx request to match respx mock route, i.e. the request above (https://our.partner.example.com/their/webhook) does not match any route in your respx fixture instance.
Need more details/example, e.g. fixture some the unittest that fails
I have a unittest that uses respx through the pytest fixture to mock the http requests. I changed something in the code, and now a bunch of tests are failing with
respx.models.AllMockedAssertionError: RESPX: <Request('POST', 'https://our.partner.example.com/their/webhook')> not mocked!
.So far, hurray for unittests. But it doesn't show me what request was actually made. It would be great if there was some kind of output showing the mocked requests and the actual requests, so I can see the difference. Now i am just guessing what the issue is. Pytest normally can show diffs on assertion errors with plain values.
The text was updated successfully, but these errors were encountered: