diff --git a/sahara/tests/unit/service/edp/binary_retrievers/test_manila.py b/sahara/tests/unit/service/edp/binary_retrievers/test_manila.py index 1f35f2cd6c..2d61533d53 100644 --- a/sahara/tests/unit/service/edp/binary_retrievers/test_manila.py +++ b/sahara/tests/unit/service/edp/binary_retrievers/test_manila.py @@ -53,14 +53,14 @@ class TestManilaShare(base.SaharaTestCase): remote.instance.node_group.shares = ng_shares info = ms.get_file_info(job_binary, remote) - self.assertItemsEqual({'path': '/mnt/mymountpoint/the_path', + self.assertCountEqual({'path': '/mnt/mymountpoint/the_path', 'type': 'path'}, info) self.assertEqual(0, mount_shares.call_count) self.assertEqual(0, cluster_update.call_count) job_binary.url = 'manila://123456/the_path' info = ms.get_file_info(job_binary, remote) - self.assertItemsEqual({'path': '/mnt/themountpoint/the_path', + self.assertCountEqual({'path': '/mnt/themountpoint/the_path', 'type': 'path'}, info) self.assertEqual(0, mount_shares.call_count) self.assertEqual(0, cluster_update.call_count) @@ -74,7 +74,7 @@ class TestManilaShare(base.SaharaTestCase): job_binary.url = 'manila://missing_id/the_path' info = ms.get_file_info(job_binary, remote) - self.assertItemsEqual({'path': '/mnt/missing_id/the_path', + self.assertCountEqual({'path': '/mnt/missing_id/the_path', 'type': 'path'}, info) self.assertEqual(1, mount_shares.call_count) self.assertEqual(1, cluster_update.call_count) diff --git a/sahara/tests/unit/service/edp/job_binaries/manila/test_manila_type.py b/sahara/tests/unit/service/edp/job_binaries/manila/test_manila_type.py index 049ebe3547..19d500222f 100644 --- a/sahara/tests/unit/service/edp/job_binaries/manila/test_manila_type.py +++ b/sahara/tests/unit/service/edp/job_binaries/manila/test_manila_type.py @@ -75,12 +75,12 @@ class TestManilaType(base.SaharaTestCase): info = self.manila_type.copy_binary_to_cluster(job_binary, remote=remote) - self.assertItemsEqual('/mnt/mymountpoint/the_path', info) + self.assertCountEqual('/mnt/mymountpoint/the_path', info) job_binary.url = 'manila://123456/the_path' info = self.manila_type.copy_binary_to_cluster(job_binary, remote=remote) - self.assertItemsEqual('/mnt/themountpoint/the_path', info) + self.assertCountEqual('/mnt/themountpoint/the_path', info) # missing id default_mount.return_value = '/mnt/missing_id' @@ -89,7 +89,7 @@ class TestManilaType(base.SaharaTestCase): info = self.manila_type.copy_binary_to_cluster(job_binary, remote=remote) - self.assertItemsEqual('/mnt/missing_id/the_path', info) + self.assertCountEqual('/mnt/missing_id/the_path', info) @mock.patch('sahara.utils.openstack.manila.client') @mock.patch('sahara.conductor.API.cluster_update') diff --git a/sahara/tests/unit/service/edp/test_job_utils.py b/sahara/tests/unit/service/edp/test_job_utils.py index 497b611734..c6ef7f5b66 100644 --- a/sahara/tests/unit/service/edp/test_job_utils.py +++ b/sahara/tests/unit/service/edp/test_job_utils.py @@ -106,7 +106,7 @@ class JobUtilsTestCase(testtools.TestCase): job_configs = {'args': [name_ref, name_ref2, id], 'configs': {'config': name_ref}, 'params': {'param': name_ref}} - self.assertItemsEqual( + self.assertCountEqual( ['name', 'name2'], job_utils.find_possible_data_source_refs_by_name(job_configs)) @@ -152,7 +152,7 @@ class JobUtilsTestCase(testtools.TestCase): job_configs = {'args': [id, id2, name_ref], 'configs': {'config': id}, 'params': {'param': id}} - self.assertItemsEqual([id, id2], + self.assertCountEqual([id, id2], job_utils.find_possible_data_source_refs_by_uuid( job_configs)) @@ -231,11 +231,11 @@ class JobUtilsTestCase(testtools.TestCase): def test_to_url_dict(self): data_source_urls = {'1': ('1_native', '1_runtime'), '2': ('2_native', '2_runtime')} - self.assertItemsEqual({'1': '1_native', + self.assertCountEqual({'1': '1_native', '2': '2_native'}, job_utils.to_url_dict(data_source_urls)) - self.assertItemsEqual({'1': '1_runtime', + self.assertCountEqual({'1': '1_runtime', '2': '2_runtime'}, job_utils.to_url_dict(data_source_urls, runtime=True))