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

Some tests misusing assertTrue for comparisons fix #773

Conversation

code-review-doctor
Copy link

Fixes #772

@code-review-doctor code-review-doctor requested a review from a team as a code owner February 15, 2022 17:14
@code-review-doctor code-review-doctor deleted the fix-avoid-misusing-assert-true branch February 15, 2022 17:18
@code-review-doctor code-review-doctor restored the fix-avoid-misusing-assert-true branch February 15, 2022 17:19
@code-review-doctor
Copy link
Author

Is the test failing because the test is wrong, or the test logic the test is checking is wrong?

@marcofucci
Copy link
Contributor

@code-review-doctor thanks for fixing the typo in the test!

I haven't checked but I think you need to change
case = make_recipe("legalaid.case")
into something like
case = make_recipe("legalaid.case", personal_details=None)

As the recipe has a default value for personal_details.

The test just makes sure the code doesn't break if personal_details is None and case is saved as there's some custom logic on model save. Hopefully it won't break 😅.

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.

Some tests misusing assertTrue for comparisons
3 participants