Merge "Switch from unittest2 compat methods to Python 3.x methods"

This commit is contained in:
Zuul 2020-07-07 20:58:17 +00:00 committed by Gerrit Code Review
commit 26299257ce
4 changed files with 4 additions and 4 deletions

View File

@ -144,7 +144,7 @@ class DISCOConnectorTestCase(test_connector.ConnectorTestCase):
"""Test to get all the available DISCO volumes."""
expected = ['/dev/dms1234567']
actual = self.connector.get_all_available_volumes(None)
self.assertItemsEqual(expected, actual)
self.assertCountEqual(expected, actual)
def test_extend_volume(self):
self.assertRaises(NotImplementedError,

View File

@ -424,7 +424,7 @@ class FibreChannelConnectorTestCase(test_connector.ConnectorTestCase):
mock_isdir.return_value = False
expected = []
actual = self.connector.get_all_available_volumes()
self.assertItemsEqual(expected, actual)
self.assertCountEqual(expected, actual)
@mock.patch('eventlet.greenthread.sleep', mock.Mock())
@mock.patch.object(linuxscsi.LinuxSCSI, 'find_multipath_device')

View File

@ -919,7 +919,7 @@ Setting up iSCSI targets: unused
mock_isdir.return_value = False
expected = []
actual = self.connector.get_all_available_volumes()
self.assertItemsEqual(expected, actual)
self.assertCountEqual(expected, actual)
@mock.patch.object(iscsi.ISCSIConnector, '_get_device_path')
def test_get_potential_paths_mpath(self, get_path_mock):

View File

@ -60,7 +60,7 @@ class WindowsFCConnectorTestCase(test_base.WindowsConnectorTestBase):
else:
expected_props = {}
self.assertItemsEqual(expected_props, props)
self.assertCountEqual(expected_props, props)
@mock.patch.object(fc.WindowsFCConnector, '_get_scsi_wwn')
@mock.patch.object(fc.WindowsFCConnector, 'get_volume_paths')