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

Fix mock usage #3519

Merged
merged 1 commit into from
Dec 28, 2022
Merged

Fix mock usage #3519

merged 1 commit into from
Dec 28, 2022

Conversation

cklein
Copy link
Contributor

@cklein cklein commented Dec 28, 2022

Some tests used assert mock_object.called_once_with(). The return value of called_once_with() is a mock object which always evaluates to true which means it always passes the assertion.

Some tests used `assert mock_object.called_once_with()`. The return
value of `called_once_with()` is a mock object which always evaluates to
true which means it always passes the assertion.
@nemacysts nemacysts merged commit 5db8c78 into Yelp:master Dec 28, 2022
@cklein cklein deleted the u/cklein/fix_mock_usage branch December 29, 2022 08:26
@cklein
Copy link
Contributor Author

cklein commented Jan 3, 2023

python/cpython#100690

gmdfalk pushed a commit to gmdfalk/paasta that referenced this pull request Jun 26, 2023
Some tests used `assert mock_object.called_once_with()`. The return
value of `called_once_with()` is a mock object which always evaluates to
true which means it always passes the assertion.
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