summaryrefslogtreecommitdiff
path: root/openstackclient/tests
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-09-30 12:01:19 +0000
committerGerrit Code Review <review@openstack.org>2022-09-30 12:01:19 +0000
commit217654e16cf8e891bc4afc2246d93013bb71598e (patch)
treece77532a254b925c7924e3b6006010ca355c441a /openstackclient/tests
parent46ead4abea4296a86e862fc035811eba2c7efac4 (diff)
parent7e5b528e2e1503392f968f75fcf4a7bb0108378d (diff)
downloadpython-openstackclient-217654e16cf8e891bc4afc2246d93013bb71598e.tar.gz
Merge "Replace assertItemsEqual with assertCountEqual"
Diffstat (limited to 'openstackclient/tests')
-rw-r--r--openstackclient/tests/unit/compute/v2/test_server.py12
-rw-r--r--openstackclient/tests/unit/network/v2/test_local_ip.py14
-rw-r--r--openstackclient/tests/unit/network/v2/test_subnet.py4
3 files changed, 15 insertions, 15 deletions
diff --git a/openstackclient/tests/unit/compute/v2/test_server.py b/openstackclient/tests/unit/compute/v2/test_server.py
index d393acda..0760fc66 100644
--- a/openstackclient/tests/unit/compute/v2/test_server.py
+++ b/openstackclient/tests/unit/compute/v2/test_server.py
@@ -5101,8 +5101,8 @@ class TestServerListV273(_TestServerList):
self.search_opts['locked'] = True
self.servers_mock.list.assert_called_with(**self.kwargs)
- self.assertItemsEqual(self.columns, columns)
- self.assertItemsEqual(self.data, tuple(data))
+ self.assertCountEqual(self.columns, columns)
+ self.assertCountEqual(self.data, tuple(data))
def test_server_list_with_unlocked_v273(self):
@@ -5121,8 +5121,8 @@ class TestServerListV273(_TestServerList):
self.search_opts['locked'] = False
self.servers_mock.list.assert_called_with(**self.kwargs)
- self.assertItemsEqual(self.columns, columns)
- self.assertItemsEqual(self.data, tuple(data))
+ self.assertCountEqual(self.columns, columns)
+ self.assertCountEqual(self.data, tuple(data))
def test_server_list_with_locked_and_unlocked(self):
@@ -5162,8 +5162,8 @@ class TestServerListV273(_TestServerList):
self.servers_mock.list.assert_called_with(**self.kwargs)
- self.assertItemsEqual(self.columns, columns)
- self.assertItemsEqual(self.data, tuple(data))
+ self.assertCountEqual(self.columns, columns)
+ self.assertCountEqual(self.data, tuple(data))
@mock.patch.object(iso8601, 'parse_date', side_effect=iso8601.ParseError)
def test_server_list_with_invalid_changes_before(
diff --git a/openstackclient/tests/unit/network/v2/test_local_ip.py b/openstackclient/tests/unit/network/v2/test_local_ip.py
index 97e246df..be23365e 100644
--- a/openstackclient/tests/unit/network/v2/test_local_ip.py
+++ b/openstackclient/tests/unit/network/v2/test_local_ip.py
@@ -96,7 +96,7 @@ class TestCreateLocalIP(TestLocalIP):
self.network.create_local_ip.assert_called_once_with(**{})
self.assertEqual(set(self.columns), set(columns))
- self.assertItemsEqual(self.data, data)
+ self.assertCountEqual(self.data, data)
def test_create_all_options(self):
arglist = [
@@ -130,7 +130,7 @@ class TestCreateLocalIP(TestLocalIP):
'ip_mode': self.new_local_ip.ip_mode,
})
self.assertEqual(set(self.columns), set(columns))
- self.assertItemsEqual(self.data, data)
+ self.assertCountEqual(self.data, data)
class TestDeleteLocalIP(TestLocalIP):
@@ -263,7 +263,7 @@ class TestListLocalIP(TestLocalIP):
self.network.local_ips.assert_called_once_with(**{})
self.assertEqual(self.columns, columns)
- self.assertItemsEqual(self.data, list(data))
+ self.assertCountEqual(self.data, list(data))
def test_local_ip_list_name(self):
arglist = [
@@ -278,7 +278,7 @@ class TestListLocalIP(TestLocalIP):
self.network.local_ips.assert_called_once_with(
**{'name': self.local_ips[0].name})
self.assertEqual(self.columns, columns)
- self.assertItemsEqual(self.data, list(data))
+ self.assertCountEqual(self.data, list(data))
def test_local_ip_list_project(self):
project = identity_fakes_v3.FakeProject.create_one_project()
@@ -295,7 +295,7 @@ class TestListLocalIP(TestLocalIP):
self.network.local_ips.assert_called_once_with(
**{'project_id': project.id})
self.assertEqual(self.columns, columns)
- self.assertItemsEqual(self.data, list(data))
+ self.assertCountEqual(self.data, list(data))
def test_local_ip_project_domain(self):
project = identity_fakes_v3.FakeProject.create_one_project()
@@ -314,7 +314,7 @@ class TestListLocalIP(TestLocalIP):
self.network.local_ips.assert_called_once_with(**filters)
self.assertEqual(self.columns, columns)
- self.assertItemsEqual(self.data, list(data))
+ self.assertCountEqual(self.data, list(data))
def test_local_ip_list_network(self):
arglist = [
@@ -477,4 +477,4 @@ class TestShowLocalIP(TestLocalIP):
self.network.find_local_ip.assert_called_once_with(
self._local_ip.name, ignore_missing=False)
self.assertEqual(set(self.columns), set(columns))
- self.assertItemsEqual(self.data, list(data))
+ self.assertCountEqual(self.data, list(data))
diff --git a/openstackclient/tests/unit/network/v2/test_subnet.py b/openstackclient/tests/unit/network/v2/test_subnet.py
index 6b3ab2cc..7aaa583d 100644
--- a/openstackclient/tests/unit/network/v2/test_subnet.py
+++ b/openstackclient/tests/unit/network/v2/test_subnet.py
@@ -918,7 +918,7 @@ class TestListSubnet(TestSubnet):
self.network.subnets.assert_called_once_with(**filters)
self.assertEqual(self.columns, columns)
- self.assertItemsEqual(self.data, list(data))
+ self.assertCountEqual(self.data, list(data))
def test_subnet_list_subnetpool_by_id(self):
subnet_pool = network_fakes.FakeSubnetPool.create_one_subnet_pool()
@@ -939,7 +939,7 @@ class TestListSubnet(TestSubnet):
self.network.subnets.assert_called_once_with(**filters)
self.assertEqual(self.columns, columns)
- self.assertItemsEqual(self.data, list(data))
+ self.assertCountEqual(self.data, list(data))
def test_list_with_tag_options(self):
arglist = [