Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: control request assertion on callback level #146

Closed
wants to merge 1 commit into from

Conversation

felixscherz
Copy link

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!

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@Colin-b
Copy link
Owner

Colin-b commented Sep 19, 2024

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

@Colin-b Colin-b closed this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants