]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Utilizes assertIn and assertNotIn
authorZhongyue Luo <zhongyue.nah@intel.com>
Fri, 30 Aug 2013 05:33:22 +0000 (13:33 +0800)
committerZhongyue Luo <zhongyue.nah@intel.com>
Fri, 30 Aug 2013 14:52:31 +0000 (22:52 +0800)
commit1eb3bc803e87119a808e123a2edc7a0341e70480
treeeb08d72aaf3d8eba3fce6046b36a7a1f4c342e35
parent432f819b467236ab41d6c9ac30f669f18ae55dd3
Utilizes assertIn and assertNotIn

Using assertTrue and the 'in' operator to test if an element is in a sequence
is too python2.4. Our unit testing framework 'testtools' support assertIn and
assertNotIn, included from python 2.7, which were created for these types of
tests. Let's use assertIn or assertNotIn for these tests.

Change-Id: I8b43f7ff5f306e1ce57296d89679333ce24e4b64
33 files changed:
cinder/tests/api/contrib/test_backups.py
cinder/tests/api/contrib/test_quotas.py
cinder/tests/api/contrib/test_types_extra_specs.py
cinder/tests/api/contrib/test_volume_host_attribute.py
cinder/tests/api/contrib/test_volume_migration_status_attribute.py
cinder/tests/api/contrib/test_volume_tenant_attribute.py
cinder/tests/api/contrib/test_volume_transfer.py
cinder/tests/api/contrib/test_volume_type_encryption.py
cinder/tests/api/middleware/test_faults.py
cinder/tests/api/openstack/test_wsgi.py
cinder/tests/api/test_xmlutil.py
cinder/tests/api/v1/test_limits.py
cinder/tests/api/v1/test_snapshots.py
cinder/tests/api/v1/test_types.py
cinder/tests/api/v1/test_volumes.py
cinder/tests/api/v2/test_limits.py
cinder/tests/api/v2/test_snapshots.py
cinder/tests/api/v2/test_types.py
cinder/tests/api/v2/test_volumes.py
cinder/tests/image/test_glance.py
cinder/tests/integrated/test_volumes.py
cinder/tests/scheduler/test_filter_scheduler.py
cinder/tests/test_conf.py
cinder/tests/test_db_api.py
cinder/tests/test_hds.py
cinder/tests/test_migrations.py
cinder/tests/test_qos_specs.py
cinder/tests/test_volume.py
cinder/tests/test_volume_rpcapi.py
cinder/tests/test_volume_types.py
cinder/tests/test_volume_utils.py
cinder/tests/test_wsgi.py
cinder/tests/test_xenapi_sm.py