-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Replace called_with with assert_called_with #42712
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
Comments
Assigning to @getsentry/support for routing, due by Wed Jan 04 2023 01:00:00 GMT+0000. ⏲️ |
Routing to @getsentry/team-web-sdk-backend for triage, due by Thu Jan 05 2023 01:00:00 GMT+0000. ⏲️ |
Routing to @getsentry/app-backend for triage, due by Fri Jan 06 2023 01:00:00 GMT+0000. ⏲️ |
JoshFerge
added a commit
that referenced
this issue
Jan 5, 2023
fixes the easier broken test assertions reported in #42712
armenzg
added a commit
that referenced
this issue
Jan 12, 2023
In #42712 it was reported that the usage of `called_with` is not correct and it indeed does not work. This part of the test is not as important as it used to be. We can remove it.
armenzg
added a commit
that referenced
this issue
Jan 12, 2023
… it was not testing what we intended. Unfortunately, I have not been able to fix it in any of the cases.
armenzg
added a commit
that referenced
this issue
Jan 12, 2023
In #42712 it was reported that are usage of `called_with` is incorrect. Unfortunately, using `assert_called_with` does not work because comparing `NodeData` would require extra work to make the comparison of two objects work well.
armenzg
added a commit
that referenced
this issue
Jan 12, 2023
In #42712 it was reported that the usage of `called_with` is not correct and it indeed does not work. This part of the test is not as important as it used to be. We can remove it.
Handling this in #43199 |
armenzg
added a commit
that referenced
this issue
Jan 13, 2023
In #42712 it was reported that the usage of `called_with` is not correct. I tried using `assert_called_with` but there were various issues to fix it.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Environment
SaaS (https://sentry.io/)
Version
No response
Link
No response
DSN
No response
Steps to Reproduce
called_with
is an incorrect method that just returns a Mock object that evaluates to True and doesn't perform appropriate assertion. This method should be replaced withassert_called_with
. Related CPython issue : python/cpython#100690Expected Result
Use
assert_called_with
methodActual Result
called_with
method is used.The text was updated successfully, but these errors were encountered: