data-workspace-frontend icon indicating copy to clipboard operation
data-workspace-frontend copied to clipboard

Some tests misusing assertTrue for comparisons

Open code-review-doctor opened this issue 3 years ago • 0 comments
trafficstars

assertTrue is not for comparing arguments, should use assertEqual for that.

The developer's intent of the test was to compare argument 1 with argument 2, which is not happening. Really what is happening is the test is passing because first argument is truthy. The correct method to use is assertEqual. more details

https://github.com/uktrade/data-workspace/blob/1afe282ac34f7adeaf6558d65e1bb3e37c857acc/dataworkspace/dataworkspace/tests/test_admin.py#L2112

I found this issue automatically, see other issues here

code-review-doctor avatar Feb 15 '22 17:02 code-review-doctor