pytest_httpx
pytest_httpx copied to clipboard
feat: control request assertion on callback level
Hi,
this PR introduces an assert_requested argument to control whether a callback should be checked for if it was called during test execution.
This can already be controlled with the assert_all_responses_were_requested fixture on an all-or-nothing basis, but this feature allows more fine-grained control.
Let me know what you think!
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication
Hello @felixscherz
Thanks for the proposal.
The next release will include a pytest marker allowing to configure assert_all_responses_were_requested per test case.
According to the test case you wrote, I assume this would fix your use case.
Feel free to open an issue describing your need if my assumption was wrong.
Thanks again