diff options
author | Alfredo Moralejo <amoralej@redhat.com> | 2023-01-31 16:56:33 +0100 |
---|---|---|
committer | Alfredo Moralejo <amoralej@redhat.com> | 2023-01-31 16:58:48 +0100 |
commit | 42d9b6ea571e30e4ca1fda9a21dd6ad2189a4f2f (patch) | |
tree | 18cbb4d8dcbaf79aa110a873e537e37b9eb88599 | |
parent | e1872e01bfcb2edc5cbd6e6f44a1cfa6443dea18 (diff) | |
download | python-openstackclient-42d9b6ea571e30e4ca1fda9a21dd6ad2189a4f2f.tar.gz |
Replace assertItemsEqual with assertCountEqual
Similar to [1] required after adding some new tests in [2]
[1] https://review.opendev.org/c/openstack/python-openstackclient/+/805790
[2] https://review.opendev.org/c/openstack/python-openstackclient/+/819938
Change-Id: I6f4f867048793f9e1e1a05afa4f2beaf8def5053
-rw-r--r-- | openstackclient/tests/unit/compute/v2/test_server.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openstackclient/tests/unit/compute/v2/test_server.py b/openstackclient/tests/unit/compute/v2/test_server.py index 9ad75853..bcfaf938 100644 --- a/openstackclient/tests/unit/compute/v2/test_server.py +++ b/openstackclient/tests/unit/compute/v2/test_server.py @@ -4404,8 +4404,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): @@ -4424,8 +4424,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): @@ -4465,8 +4465,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( |