Misuse of assertTrue in test scripts
Bug #1223620 reported by
Zhongyue Luo
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Zhongyue Luo |
Bug Description
Below modules have places where assertTrue is used when assertEqual is needed
nova/tests/
nova/tests/
nova/tests/
Changed in nova: | |
assignee: | nobody → Zhongyue Luo (zyluo) |
Changed in nova: | |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → havana-rc1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | havana-rc1 → 2013.2 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/45151 github. com/openstack/ nova/commit/ 40a718e30e4ea27 eaff85f51792beb 9bff71169e
Committed: http://
Submitter: Jenkins
Branch: master
commit 40a718e30e4ea27 eaff85f51792beb 9bff71169e
Author: Zhongyue Luo <email address hidden>
Date: Thu Sep 5 08:57:11 2013 +0800
Fixes misuse of assertTrue in test scripts
Misuse of assertTrue in places where assertEqual or assertIn should be used.
If assertTrue is used, the test will always pass
if the first argument's boolean cast is True. The second argument
passed to assertTrue() will be regarded as the error message
when the assertion fails.
Fixes bug #1223620
Change-Id: I46b51bf944ba22 247901172650ea6 867dd525aa7