]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Replace assertEqual(True, *) -> assertTrue(*)
authorKallebe Monteiro <kallebe.monteiro@lsbd.ufc.br>
Mon, 9 Mar 2015 19:05:36 +0000 (16:05 -0300)
committerKallebe Monteiro <kallebe.monteiro@lsbd.ufc.br>
Tue, 10 Mar 2015 11:23:17 +0000 (11:23 +0000)
commit955d9088cba9db373953a934c0e8f7060244a856
tree472420f9233242a675866070ec72ba21a277cb6b
parentdcca9f4aa0400580640249d4a45f563aa598868f
Replace assertEqual(True, *) -> assertTrue(*)

Inspired by Dave Chen's change request on keystone about this, I
decided to check in cinder code to see if there were many cases.

Since unittest provides assertTrue and assertFalse, it is better
to use assertTrue(var) instead of assertEqual(True, var) and the same
thing applies to assertFalse.

I used these commands to search the occurrences:
* grep -PRIn "assertEqual\(True"
* grep -PRIn "assertEqual\(False"
* grep -PRIn "assertEqual\(\w+\s*,\s*True"
* grep -PRIn "assertEqual\(\w+\s*,\s*False"

Closes-Bug: #1430262

Change-Id: Ie92ce744d68a473b9ecc5214ed322bf2c5f5e000
15 files changed:
cinder/tests/brick/test_brick_connector.py
cinder/tests/image/test_glance.py
cinder/tests/test_dellscapi.py
cinder/tests/test_evaluator.py
cinder/tests/test_glusterfs.py
cinder/tests/test_gpfs.py
cinder/tests/test_hplefthand.py
cinder/tests/test_ibm_flashsystem.py
cinder/tests/test_ibmnas.py
cinder/tests/test_prophetstor_dpl.py
cinder/tests/test_smbfs.py
cinder/tests/test_storpool.py
cinder/tests/test_v6000_fcp.py
cinder/tests/test_volume.py
cinder/tests/test_volume_types.py