]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fixes misuse of assertTrue in test scripts
authorZhongyue Luo <zhongyue.nah@intel.com>
Fri, 6 Sep 2013 04:10:28 +0000 (12:10 +0800)
committerZhongyue Luo <zhongyue.nah@intel.com>
Fri, 6 Sep 2013 04:13:20 +0000 (12:13 +0800)
commitb2e0f75ddaea0c12e154432da7a860725af8e344
tree79ac83555040b3cdee1363383c8fa5287158e8aa
parentfcb68592d2d6fae79d749793dc5e38915134604b
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: I68f614164803729ea26e65f8868b0031e724d324
cinder/tests/brick/test_brick_connector.py
cinder/tests/brick/test_brick_linuxscsi.py