diff options
| author | Stephen Finucane <sfinucan@redhat.com> | 2020-11-04 16:16:58 +0000 |
|---|---|---|
| committer | Stephen Finucane <sfinucan@redhat.com> | 2020-12-09 15:17:25 +0000 |
| commit | f5b185c35728025ebfd4145c800648b34476b775 (patch) | |
| tree | ca90e0d63f5535aa20c6a32bb1f7c1a170abd4a7 /openstackclient/tests/unit/compute/v2/test_aggregate.py | |
| parent | 0edd055f3f2a86a60226c342a617507ab94c5eaa (diff) | |
| download | python-openstackclient-f5b185c35728025ebfd4145c800648b34476b775.tar.gz | |
Make use of comparable 'FormattableColumn' subclasses
This requires fixes found in cliff 3.5.0 [1] and osc-lib 2.3.0 [2]. With
these fixes in place, we can remove the icky, still broken
'assertItemEqual' and 'assertListItemEqual' helpers.
[1] https://review.opendev.org/761421
[2] https://review.opendev.org/761394
Change-Id: Id6c26b37c3c7d5ec6761361abca57f9219b76838
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'openstackclient/tests/unit/compute/v2/test_aggregate.py')
| -rw-r--r-- | openstackclient/tests/unit/compute/v2/test_aggregate.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/openstackclient/tests/unit/compute/v2/test_aggregate.py b/openstackclient/tests/unit/compute/v2/test_aggregate.py index e4c13ea5..e12edd0f 100644 --- a/openstackclient/tests/unit/compute/v2/test_aggregate.py +++ b/openstackclient/tests/unit/compute/v2/test_aggregate.py @@ -88,7 +88,7 @@ class TestAggregateAddHost(TestAggregate): self.sdk_client.add_host_to_aggregate.assert_called_once_with( self.fake_ag.id, parsed_args.host) self.assertEqual(self.columns, columns) - self.assertItemEqual(self.data, data) + self.assertItemsEqual(self.data, data) class TestAggregateCreate(TestAggregate): @@ -112,7 +112,7 @@ class TestAggregateCreate(TestAggregate): self.sdk_client.create_aggregate.assert_called_once_with( name=parsed_args.name) self.assertEqual(self.columns, columns) - self.assertItemEqual(self.data, data) + self.assertItemsEqual(self.data, data) def test_aggregate_create_with_zone(self): arglist = [ @@ -129,7 +129,7 @@ class TestAggregateCreate(TestAggregate): self.sdk_client.create_aggregate.assert_called_once_with( name=parsed_args.name, availability_zone=parsed_args.zone) self.assertEqual(self.columns, columns) - self.assertItemEqual(self.data, data) + self.assertItemsEqual(self.data, data) def test_aggregate_create_with_property(self): arglist = [ @@ -148,7 +148,7 @@ class TestAggregateCreate(TestAggregate): self.sdk_client.set_aggregate_metadata.assert_called_once_with( self.fake_ag.id, parsed_args.property) self.assertEqual(self.columns, columns) - self.assertItemEqual(self.data, data) + self.assertItemsEqual(self.data, data) class TestAggregateDelete(TestAggregate): @@ -265,7 +265,7 @@ class TestAggregateList(TestAggregate): columns, data = self.cmd.take_action(parsed_args) self.assertEqual(self.list_columns, columns) - self.assertItemEqual(self.list_data, tuple(data)) + self.assertItemsEqual(self.list_data, tuple(data)) def test_aggregate_list_with_long(self): arglist = [ @@ -278,7 +278,7 @@ class TestAggregateList(TestAggregate): columns, data = self.cmd.take_action(parsed_args) self.assertEqual(self.list_columns_long, columns) - self.assertListItemEqual(self.list_data_long, tuple(data)) + self.assertItemsEqual(self.list_data_long, tuple(data)) class TestAggregateRemoveHost(TestAggregate): @@ -306,7 +306,7 @@ class TestAggregateRemoveHost(TestAggregate): self.sdk_client.remove_host_from_aggregate.assert_called_once_with( self.fake_ag.id, parsed_args.host) self.assertEqual(self.columns, columns) - self.assertItemEqual(self.data, data) + self.assertItemsEqual(self.data, data) class TestAggregateSet(TestAggregate): @@ -492,7 +492,7 @@ class TestAggregateShow(TestAggregate): parsed_args.aggregate, ignore_missing=False) self.assertEqual(self.columns, columns) - self.assertItemEqual(self.data, tuple(data)) + self.assertItemsEqual(self.data, tuple(data)) class TestAggregateUnset(TestAggregate): |
