def test_disconnect_volume(self):
"""Test the basic disconnect volume case."""
self.connector.connect_volume(self.connection_properties)
- self.assertEqual(True, HuaweiStorHyperConnectorTestCase.attached)
+ self.assertTrue(HuaweiStorHyperConnectorTestCase.attached)
self.connector.disconnect_volume(self.connection_properties,
self.device_info)
- self.assertEqual(False, HuaweiStorHyperConnectorTestCase.attached)
+ self.assertFalse(HuaweiStorHyperConnectorTestCase.attached)
expected_commands = [self.fake_sdscli_file + ' -c attach'
' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f',
def test_is_volume_connected(self):
"""Test if volume connected to host case."""
self.connector.connect_volume(self.connection_properties)
- self.assertEqual(True, HuaweiStorHyperConnectorTestCase.attached)
+ self.assertTrue(HuaweiStorHyperConnectorTestCase.attached)
is_connected = self.connector.is_volume_connected(
'volume-b2911673-863c-4380-a5f2-e1729eecfe3f')
self.assertEqual(HuaweiStorHyperConnectorTestCase.attached,
is_connected)
self.connector.disconnect_volume(self.connection_properties,
self.device_info)
- self.assertEqual(False, HuaweiStorHyperConnectorTestCase.attached)
+ self.assertFalse(HuaweiStorHyperConnectorTestCase.attached)
is_connected = self.connector.is_volume_connected(
'volume-b2911673-863c-4380-a5f2-e1729eecfe3f')
self.assertEqual(HuaweiStorHyperConnectorTestCase.attached,
def test_disconnect_volume_fail(self):
"""Test the fail disconnect volume case."""
self.connector.connect_volume(self.connection_properties)
- self.assertEqual(True, HuaweiStorHyperConnectorTestCase.attached)
+ self.assertTrue(HuaweiStorHyperConnectorTestCase.attached)
self.assertRaises(exception.BrickException,
self.connector_fail.disconnect_volume,
self.connection_properties,
def test_disconnect_volume_nocli(self):
"""Test the fail disconnect volume case."""
self.connector.connect_volume(self.connection_properties)
- self.assertEqual(True, HuaweiStorHyperConnectorTestCase.attached)
+ self.assertTrue(HuaweiStorHyperConnectorTestCase.attached)
self.assertRaises(exception.BrickException,
self.connector_nocli.disconnect_volume,
self.connection_properties,
def __init__(inst, version, *args, **kwargs):
self.assertEqual('1', version)
self.assertEqual("http://fake_host:9292", args[0])
- self.assertEqual(True, kwargs['token'])
+ self.assertTrue(kwargs['token'])
self.assertEqual(60, kwargs['timeout'])
self.stubs.Set(glance.glanceclient, 'Client', MyGlanceStubClient)
def __init__(inst, version, *args, **kwargs):
self.assertEqual("1", version)
self.assertEqual("http://fake_host:9292", args[0])
- self.assertEqual(True, kwargs['token'])
+ self.assertTrue(kwargs['token'])
self.assertNotIn('timeout', kwargs)
self.stubs.Set(glance.glanceclient, 'Client', MyGlanceStubClient)
mock_delete.assert_called()
mock_find_volume.assert_called_once_with(12345, self.volume_name, None)
mock_get_json.assert_called()
- self.assertEqual(True, res, 'Expected True')
+ self.assertTrue(res, 'Expected True')
@mock.patch.object(dell_storagecenter_api.HttpClient,
'delete',
# Test case where volume to be deleted does not exist
res = self.scapi.delete_volume(12345,
self.volume_name)
- self.assertEqual(True, res, 'Expected True')
+ self.assertTrue(res, 'Expected True')
@mock.patch.object(dell_storagecenter_api.StorageCenterApi,
'_create_folder_path',
self.IQN,
False)
mock_post.assert_called()
- self.assertEqual(True, res, 'Expected True')
+ self.assertTrue(res, 'Expected True')
@mock.patch.object(dell_storagecenter_api.HttpClient,
'post',
self.WWN,
True)
mock_post.assert_called()
- self.assertEqual(True, res, 'Expected True')
+ self.assertTrue(res, 'Expected True')
@mock.patch.object(dell_storagecenter_api.HttpClient,
'post',
self.IQN,
False)
mock_post.assert_called()
- self.assertEqual(False, res, 'Expected False')
+ self.assertFalse(res, 'Expected False')
@mock.patch.object(dell_storagecenter_api.StorageCenterApi,
'_get_json',
mock_get.assert_called()
mock_get_json.assert_called()
mock_delete.assert_called()
- self.assertEqual(True, res, 'Expected True')
+ self.assertTrue(res, 'Expected True')
@mock.patch.object(dell_storagecenter_api.HttpClient,
'get',
res = self.scapi.unmap_volume(self.VOLUME,
self.SCSERVER)
mock_get.assert_called()
- self.assertEqual(False, res, 'Expected False')
+ self.assertFalse(res, 'Expected False')
@mock.patch.object(dell_storagecenter_api.HttpClient,
'delete',
mock_get.assert_called()
mock_get_json.assert_called()
mock_delete.assert_called()
- self.assertEqual(True, res, 'Expected True')
+ self.assertTrue(res, 'Expected True')
@mock.patch.object(dell_storagecenter_api.HttpClient,
'delete',
mock_get.assert_called()
mock_get_json.assert_called()
mock_delete.assert_called()
- self.assertEqual(False, res, 'Expected False')
+ self.assertFalse(res, 'Expected False')
@mock.patch.object(dell_storagecenter_api.StorageCenterApi,
'_get_json',
replayId)
mock_post.assert_called()
mock_find_replay.assert_called_once_with(self.VOLUME, replayId)
- self.assertEqual(True, res, 'Expected True')
+ self.assertTrue(res, 'Expected True')
@mock.patch.object(dell_storagecenter_api.StorageCenterApi,
'find_replay',
replayId)
mock_post.assert_called()
mock_find_replay.assert_called_once_with(self.VOLUME, replayId)
- self.assertEqual(True, res, 'Expected True')
+ self.assertTrue(res, 'Expected True')
@mock.patch.object(dell_storagecenter_api.StorageCenterApi,
'find_replay',
replayId)
mock_post.assert_called()
mock_find_replay.assert_called_once_with(self.VOLUME, replayId)
- self.assertEqual(False, res, 'Expected False')
+ self.assertFalse(res, 'Expected False')
@mock.patch.object(dell_storagecenter_api.StorageCenterApi,
'_first_result',
-8.0, evaluator. evaluate("((1.0 / 0.5) * (2)) *(-2)"))
def test_comparisons(self):
- self.assertEqual(True, evaluator.evaluate("1 < 2"))
- self.assertEqual(True, evaluator.evaluate("2 > 1"))
- self.assertEqual(True, evaluator.evaluate("2 != 1"))
- self.assertEqual(False, evaluator.evaluate("1 > 2"))
- self.assertEqual(False, evaluator.evaluate("2 < 1"))
- self.assertEqual(False, evaluator.evaluate("2 == 1"))
- self.assertEqual(True, evaluator.evaluate("(1 == 1) == !(1 == 2)"))
+ self.assertTrue(evaluator.evaluate("1 < 2"))
+ self.assertTrue(evaluator.evaluate("2 > 1"))
+ self.assertTrue(evaluator.evaluate("2 != 1"))
+ self.assertFalse(evaluator.evaluate("1 > 2"))
+ self.assertFalse(evaluator.evaluate("2 < 1"))
+ self.assertFalse(evaluator.evaluate("2 == 1"))
+ self.assertTrue(evaluator.evaluate("(1 == 1) == !(1 == 2)"))
def test_logic_ops(self):
- self.assertEqual(True, evaluator.evaluate("(1 == 1) AND (2 == 2)"))
- self.assertEqual(True, evaluator.evaluate("(1 == 1) and (2 == 2)"))
- self.assertEqual(True, evaluator.evaluate("(1 == 1) && (2 == 2)"))
- self.assertEqual(False, evaluator.evaluate("(1 == 1) && (5 == 2)"))
-
- self.assertEqual(True, evaluator.evaluate("(1 == 1) OR (5 == 2)"))
- self.assertEqual(True, evaluator.evaluate("(1 == 1) or (5 == 2)"))
- self.assertEqual(True, evaluator.evaluate("(1 == 1) || (5 == 2)"))
- self.assertEqual(False, evaluator.evaluate("(5 == 1) || (5 == 2)"))
-
- self.assertEqual(
- False, evaluator.evaluate("(1 == 1) AND NOT (2 == 2)"))
- self.assertEqual(
- False, evaluator.evaluate("(1 == 1) AND not (2 == 2)"))
- self.assertEqual(
- False, evaluator.evaluate("(1 == 1) AND !(2 == 2)"))
- self.assertEqual(
- True, evaluator.evaluate("(1 == 1) AND NOT (5 == 2)"))
- self.assertEqual(
- True, evaluator.evaluate("(1 == 1) OR NOT (2 == 2) AND (5 == 5)"))
+ self.assertTrue(evaluator.evaluate("(1 == 1) AND (2 == 2)"))
+ self.assertTrue(evaluator.evaluate("(1 == 1) and (2 == 2)"))
+ self.assertTrue(evaluator.evaluate("(1 == 1) && (2 == 2)"))
+ self.assertFalse(evaluator.evaluate("(1 == 1) && (5 == 2)"))
+
+ self.assertTrue(evaluator.evaluate("(1 == 1) OR (5 == 2)"))
+ self.assertTrue(evaluator.evaluate("(1 == 1) or (5 == 2)"))
+ self.assertTrue(evaluator.evaluate("(1 == 1) || (5 == 2)"))
+ self.assertFalse(evaluator.evaluate("(5 == 1) || (5 == 2)"))
+
+ self.assertFalse(evaluator.evaluate("(1 == 1) AND NOT (2 == 2)"))
+ self.assertFalse(evaluator.evaluate("(1 == 1) AND not (2 == 2)"))
+ self.assertFalse(evaluator.evaluate("(1 == 1) AND !(2 == 2)"))
+ self.assertTrue(evaluator.evaluate("(1 == 1) AND NOT (5 == 2)"))
+ self.assertTrue(evaluator.evaluate("(1 == 1) OR NOT (2 == 2) "
+ "AND (5 == 5)"))
def test_ternary_conditional(self):
self.assertEqual(5, evaluator.evaluate("(1 < 2) ? 5 : 10"))
cmd = ['umount', test_hashpath]
self.assertEqual(cmd[0], mock_execute.call_args[0][0])
self.assertEqual(cmd[1], mock_execute.call_args[0][1])
- self.assertEqual(True,
- mock_execute.call_args[1]['run_as_root'])
+ self.assertTrue(mock_execute.call_args[1]['run_as_root'])
mock_get_mntp_share.reset_mock()
mock_get_mntp_share.return_value = test_hashpath
cmd = ['umount', test_hashpath]
self.assertEqual(cmd[0], mock_execute.call_args[0][0])
self.assertEqual(cmd[1], mock_execute.call_args[0][1])
- self.assertEqual(True,
- mock_execute.call_args[1]['run_as_root'])
+ self.assertTrue(mock_execute.call_args[1]['run_as_root'])
def test_do_umount_with_excp1(self):
test_share = '127.7.7.7:/gluster1'
'nodesUp:totalNodes:remarks:cnfsState:\n'
'mmgetstate::0:1:::devstack:3:active:2:3:3:'
'quorum node:(undefined):', '')
- self.assertEqual(True, self.driver._get_gpfs_state().splitlines()[1].
- startswith('mmgetstate::0:1:::devstack'))
+ self.assertTrue(self.driver._get_gpfs_state().splitlines()[1].
+ startswith('mmgetstate::0:1:::devstack'))
@mock.patch('cinder.utils.execute')
def test_get_gpfs_state_fail_mmgetstate(self, mock_exec):
org_value = self.driver.configuration.gpfs_sparse_volumes
self.flags(volume_driver=self.driver_name, gpfs_sparse_volumes=False)
self.driver.create_volume(volume)
- self.assertEqual(True, self.driver._set_volume_attributes(volume,
- 'test', metadata))
+ self.assertTrue(self.driver._set_volume_attributes(volume, 'test',
+ metadata))
self.flags(volume_driver=self.driver_name,
gpfs_sparse_volumes=org_value)
mock_set_volume_attributes.return_value = True
metadata = [{'key': 'fake_key', 'value': 'fake_value'}]
- self.assertEqual(True, self.driver._set_volume_attributes(volume,
- 'test', metadata))
+ self.assertTrue(self.driver._set_volume_attributes(volume, 'test',
+ metadata))
self.assertEqual(self.driver.create_volume_from_snapshot(volume,
snapshot),
{'size': 5.0})
mock_set_volume_attributes.return_value = True
metadata = [{'key': 'fake_key', 'value': 'fake_value'}]
- self.assertEqual(True, self.driver._set_volume_attributes(volume,
- 'test', metadata))
+ self.assertTrue(self.driver._set_volume_attributes(volume, 'test',
+ metadata))
self.assertEqual(self.driver.create_cloned_volume(volume, src_volume),
{'size': 5.0})
' no 2 148488 '
'/gpfs0/test.txt', ''),
('', '')]
- self.assertEqual(True, self.driver._gpfs_redirect(''))
+ self.assertTrue(self.driver._gpfs_redirect(''))
self.flags(volume_driver=self.driver_name, gpfs_max_clone_depth=1)
mock_exec.side_effect = [('Parent Depth Parent inode File name\n'
'------ ----- -------------- ---------\n'
' no 1 148488 '
'/gpfs0/test.txt', ''),
('', '')]
- self.assertEqual(False, self.driver._gpfs_redirect(''))
+ self.assertFalse(self.driver._gpfs_redirect(''))
self.flags(volume_driver=self.driver_name,
gpfs_max_clone_depth=org_value)
' no 2 148488 '
'/gpfs0/test.txt', ''),
('', '')]
- self.assertEqual(False, self.driver._gpfs_redirect(''))
+ self.assertFalse(self.driver._gpfs_redirect(''))
self.flags(volume_driver=self.driver_name,
gpfs_max_clone_depth=org_value)
' 148488 '
'/gpfs0/test.txt', ''),
('', '')]
- self.assertEqual(False, self.driver._gpfs_redirect(''))
+ self.assertFalse(self.driver._gpfs_redirect(''))
self.flags(volume_driver=self.driver_name,
gpfs_max_clone_depth=org_value)
'------ ----- -------------- ---------\n'
' no 2 148488 '
'/gpfs0/test.txt', '')]
- self.assertEqual(True, self.driver._is_gpfs_parent_file(''))
- self.assertEqual(False, self.driver._is_gpfs_parent_file(''))
+ self.assertTrue(self.driver._is_gpfs_parent_file(''))
+ self.assertFalse(self.driver._is_gpfs_parent_file(''))
@mock.patch('cinder.volume.drivers.ibm.gpfs.GPFSDriver._gpfs_redirect')
@mock.patch('cinder.volume.drivers.ibm.gpfs.GPFSDriver.'
# validate
self.assertEqual('iscsi', result['driver_volume_type'])
- self.assertEqual(False, result['data']['target_discovered'])
+ self.assertFalse(result['data']['target_discovered'])
self.assertEqual(self.volume_id, result['data']['volume_id'])
self.assertTrue('auth_method' not in result['data'])
# validate
self.assertEqual('iscsi', result['driver_volume_type'])
- self.assertEqual(False, result['data']['target_discovered'])
+ self.assertFalse(result['data']['target_discovered'])
self.assertEqual(self.volume_id, result['data']['volume_id'])
self.assertTrue('auth_method' not in result['data'])
# validate
self.assertEqual('iscsi', result['driver_volume_type'])
- self.assertEqual(False, result['data']['target_discovered'])
+ self.assertFalse(result['data']['target_discovered'])
self.assertEqual(self.volume_id, result['data']['volume_id'])
self.assertEqual('CHAP', result['data']['auth_method'])
vol1['name'], vol1['id'], vol2['name'], vol2['id'])
(v1_mapped, lun) = self.driver._is_vdisk_map(vol1['name'], connector)
(v2_mapped, lun) = self.driver._is_vdisk_map(vol2['name'], connector)
- self.assertEqual(False, v1_mapped)
- self.assertEqual(False, v2_mapped)
+ self.assertFalse(v1_mapped)
+ self.assertFalse(v2_mapped)
# case 2: mapped before copy
self.driver.initialize_connection(vol1, connector)
vol1['name'], vol1['id'], vol2['name'], vol2['id'])
(v1_mapped, lun) = self.driver._is_vdisk_map(vol1['name'], connector)
(v2_mapped, lun) = self.driver._is_vdisk_map(vol2['name'], connector)
- self.assertEqual(True, v1_mapped)
- self.assertEqual(True, v2_mapped)
+ self.assertTrue(v1_mapped)
+ self.assertTrue(v2_mapped)
self.driver.terminate_connection(vol1, connector)
self.driver.terminate_connection(vol2, connector)
vol1['name'], vol1['id'], vol2['name'], vol2['id'])
(v1_mapped, lun) = self.driver._is_vdisk_map(vol1['name'], connector)
(v2_mapped, lun) = self.driver._is_vdisk_map(vol2['name'], connector)
- self.assertEqual(False, v1_mapped)
- self.assertEqual(False, v2_mapped)
+ self.assertFalse(v1_mapped)
+ self.assertFalse(v2_mapped)
# case 4: no mapped before copy, raise exception when copy
copy_volume.side_effect = exception.VolumeBackendAPIException
vol1['name'], vol1['id'], vol2['name'], vol2['id'])
(v1_mapped, lun) = self.driver._is_vdisk_map(vol1['name'], connector)
(v2_mapped, lun) = self.driver._is_vdisk_map(vol2['name'], connector)
- self.assertEqual(False, v1_mapped)
- self.assertEqual(False, v2_mapped)
+ self.assertFalse(v1_mapped)
+ self.assertFalse(v2_mapped)
# clear environment
self.driver.delete_volume(vol1)
drv = self._driver
mock_size.return_value = True
- self.assertEqual(True, drv._resize_volume_file(self.TEST_LOCAL_PATH,
- self.TEST_EXTEND_SIZE_IN_GB))
+ self.assertTrue(drv._resize_volume_file(self.TEST_LOCAL_PATH,
+ self.TEST_EXTEND_SIZE_IN_GB))
@mock.patch('cinder.image.image_utils.resize_image')
def test_resize_volume_exception(self, mock_size):
self.assertEqual(4, pool['total_capacity_gb'])
self.assertEqual(4, pool['free_capacity_gb'])
self.assertEqual(0, pool['reserved_percentage'])
- self.assertEqual(False, pool['QoS_support'])
+ self.assertFalse(pool['QoS_support'])
def test_create_volume(self):
self.DPL_MOCK.create_vdev.return_value = DATA_OUTPUT
DATA_IN_CONNECTOR)
self.assertEqual('iscsi', res['driver_volume_type'])
self.assertEqual('101', res['data']['target_lun'])
- self.assertEqual(True, res['data']['target_discovered'])
+ self.assertTrue(res['data']['target_discovered'])
self.assertEqual('172.31.1.210:3260', res['data']['target_portal'])
self.assertEqual(
'iqn.2013-09.com.prophetstor:hypervisor.886423051816',
fake_volume_size = 2
ret_value = self._test_is_share_eligible(fake_capacity_info,
fake_volume_size)
- self.assertEqual(ret_value, False)
+ self.assertFalse(ret_value)
def test_eligible_share(self):
fake_capacity_info = (4, 4, 0)
fake_volume_size = 1
ret_value = self._test_is_share_eligible(fake_capacity_info,
fake_volume_size)
- self.assertEqual(ret_value, True)
+ self.assertTrue(ret_value)
def test_share_volume_above_oversub_ratio(self):
fake_capacity_info = (4, 4, 7)
fake_volume_size = 2
ret_value = self._test_is_share_eligible(fake_capacity_info,
fake_volume_size)
- self.assertEqual(ret_value, False)
+ self.assertFalse(ret_value)
def test_share_reserved_above_oversub_ratio(self):
fake_capacity_info = (4, 4, 10)
fake_volume_size = 1
ret_value = self._test_is_share_eligible(fake_capacity_info,
fake_volume_size)
- self.assertEqual(ret_value, False)
+ self.assertFalse(ret_value)
def test_parse_options(self):
(opt_list,
'volume_type': None})
except exception.VolumeBackendAPIException:
caught = True
- self.assertEqual(True, caught)
+ self.assertTrue(caught)
self.driver.delete_volume({'id': '1'})
self.assertVolumeNames([])
self.driver._build_initiator_target_map.assert_called_with(
CONNECTOR)
self.assertEqual("fibre_channel", props['driver_volume_type'])
- self.assertEqual(True, props['data']['target_discovered'])
+ self.assertTrue(props['data']['target_discovered'])
self.assertEqual(target_wwns, props['data']['target_wwn'])
self.assertEqual(lun_id, props['data']['target_lun'])
self.assertEqual(init_targ_map, props['data']['initiator_target_map'])
self.driver._build_initiator_target_map.assert_called_with(
CONNECTOR)
self.assertEqual("fibre_channel", props['driver_volume_type'])
- self.assertEqual(True, props['data']['target_discovered'])
+ self.assertTrue(props['data']['target_discovered'])
self.assertEqual(target_wwns, props['data']['target_wwn'])
self.assertEqual(lun_id, props['data']['target_lun'])
self.assertEqual(init_targ_map, props['data']['initiator_target_map'])
volume_name='fake'))
self.mox.ReplayAll()
res = self.volume.delete_volume(self.context, volume_id)
- self.assertEqual(True, res)
+ self.assertTrue(res)
volume_ref = db.volume_get(context.get_admin_context(), volume_id)
self.assertEqual(volume_id, volume_ref.id)
self.assertEqual("available", volume_ref.status)
vol = {'name': 'test', 'id': 1, 'size': 1, 'status': 'available'}
moved, model_update = self.volume.driver.migrate_volume(self.context,
vol, host)
- self.assertEqual(moved, False)
+ self.assertFalse(moved)
self.assertIsNone(model_update)
def test_lvm_migrate_volume_bad_loc_info(self):
vol = {'name': 'test', 'id': 1, 'size': 1, 'status': 'available'}
moved, model_update = self.volume.driver.migrate_volume(self.context,
vol, host)
- self.assertEqual(moved, False)
+ self.assertFalse(moved)
self.assertIsNone(model_update)
def test_lvm_migrate_volume_diff_driver(self):
vol = {'name': 'test', 'id': 1, 'size': 1, 'status': 'available'}
moved, model_update = self.volume.driver.migrate_volume(self.context,
vol, host)
- self.assertEqual(moved, False)
+ self.assertFalse(moved)
self.assertIsNone(model_update)
def test_lvm_migrate_volume_diff_host(self):
vol = {'name': 'test', 'id': 1, 'size': 1, 'status': 'available'}
moved, model_update = self.volume.driver.migrate_volume(self.context,
vol, host)
- self.assertEqual(moved, False)
+ self.assertFalse(moved)
self.assertIsNone(model_update)
def test_lvm_migrate_volume_in_use(self):
vol = {'name': 'test', 'id': 1, 'size': 1, 'status': 'in-use'}
moved, model_update = self.volume.driver.migrate_volume(self.context,
vol, host)
- self.assertEqual(moved, False)
+ self.assertFalse(moved)
self.assertIsNone(model_update)
@mock.patch.object(volutils, 'get_all_volume_groups',
moved, model_update = self.volume.driver.migrate_volume(self.context,
vol, host)
- self.assertEqual(moved, False)
+ self.assertFalse(moved)
self.assertIsNone(model_update)
def test_lvm_migrate_volume_proceed(self):
'default')
moved, model_update = self.volume.driver.migrate_volume(self.context,
vol, host)
- self.assertEqual(moved, True)
+ self.assertTrue(moved)
self.assertIsNone(model_update)
@staticmethod
# Check equality with only extra_specs
diff, same = volume_types.volume_types_diff(self.ctxt, type_ref1['id'],
type_ref2['id'])
- self.assertEqual(same, True)
+ self.assertTrue(same)
self.assertEqual(diff['extra_specs']['key1'], ('val1', 'val1'))
diff, same = volume_types.volume_types_diff(self.ctxt, type_ref1['id'],
type_ref3['id'])
- self.assertEqual(same, False)
+ self.assertFalse(same)
self.assertEqual(diff['extra_specs']['key1'], ('val1', 'val0'))
# qos_ref 1 and 2 have the same specs, while 3 has different
type_ref2['id'])
diff, same = volume_types.volume_types_diff(self.ctxt, type_ref1['id'],
type_ref2['id'])
- self.assertEqual(same, True)
+ self.assertTrue(same)
self.assertEqual(diff['extra_specs']['key1'], ('val1', 'val1'))
self.assertEqual(diff['qos_specs']['k1'], ('v1', 'v1'))
qos_specs.disassociate_qos_specs(self.ctxt, qos_ref2['id'],
type_ref2['id'])
diff, same = volume_types.volume_types_diff(self.ctxt, type_ref1['id'],
type_ref2['id'])
- self.assertEqual(same, False)
+ self.assertFalse(same)
self.assertEqual(diff['extra_specs']['key1'], ('val1', 'val1'))
self.assertEqual(diff['qos_specs']['k1'], ('v1', 'v0'))
qos_specs.disassociate_qos_specs(self.ctxt, qos_ref3['id'],
enc_keyvals2)
diff, same = volume_types.volume_types_diff(self.ctxt, type_ref1['id'],
type_ref2['id'])
- self.assertEqual(same, False)
+ self.assertFalse(same)
self.assertEqual(diff['extra_specs']['key1'], ('val1', 'val1'))
self.assertEqual(diff['qos_specs']['k1'], ('v1', 'v1'))
self.assertEqual(diff['encryption']['key_size'], (256, 128))
# Check diff equals type specs when one type is None
diff, same = volume_types.volume_types_diff(self.ctxt, None,
type_ref1['id'])
- self.assertEqual(same, False)
+ self.assertFalse(same)
self.assertEqual(diff['extra_specs'],
{'key1': (None, 'val1'), 'key2': (None, 'val2')})
self.assertEqual(diff['qos_specs'],