Misuse of assertTrue in places where assertEqual should be used.
If assertTrue is used instead of assertEquals, 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. Using assertEqual will actually check
if two arguments are same value.
Reviewed: https:/ /review. openstack. org/45370 github. com/openstack/ cinder/ commit/ b2e0f75ddaea0c1 2e154432da7a860 725af8e344
Committed: http://
Submitter: Jenkins
Branch: master
commit b2e0f75ddaea0c1 2e154432da7a860 725af8e344
Author: Zhongyue Luo <email address hidden>
Date: Fri Sep 6 12:10:28 2013 +0800
Fixes misuse of assertTrue in test scripts
Misuse of assertTrue in places where assertEqual should be used.
If assertTrue is used instead of assertEquals, 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. Using assertEqual will actually check
if two arguments are same value.
Fixes bug #1221517
Change-Id: I68f61416480372 9ea26e65f8868b0 031e724d324