From d0c0cefb84b4d7abff23e7e313acd9725df1be9b Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Wed, 10 Feb 2016 20:51:58 +0800 Subject: Identity: Fix DisplayCommandBase comments for cliff Lister subclass tests As bug #1477199 describes, the wrong comment below is all over the unit test code of OSC. # DisplayCommandBase.take_action() returns two tuples There is no such class named DisplayCommandBase in OSC. It is in cliff. All OSC command classes inherit from the base classes in cliff, class Command, class Lister and class ShowOne. It is like this: Object |--> Command |--> DisplayCommandBase |--> Lister |--> ShowOne take_action() is an abstract method of class Command, and generally is overwritten by subclasses. * Command.take_action() returns nothing. * Lister.take_action() returns a tuple which contains a tuple of columns and a generator used to generate the data. * ShowOne.take_action() returns an iterator which contains a tuple of columns and a tuple of data. So, this problem should be fixed in 3 steps: 1. Remove all DisplayCommandBase comments for tests of classes inheriting from class Command in cliff as it returns nothing. 2. Fix all DisplayCommandBase comments for tests of classes inheriting from class Lister in cliff. Lister.take_action() returns a tuple and a generator. 3. Fix all DisplayCommandBase comments for tests of classes inheriting from class ShowOne in cliff. ShowOne.take_action() returns two tuples. This patch finishes step 2 in all identity tests. Change-Id: I2929ee688b1d7afc52c6ab325982bdc24c60a995 Partial-bug: #1477199 --- .../tests/identity/v2_0/test_catalog.py | 8 +++++-- .../tests/identity/v2_0/test_endpoint.py | 8 +++++-- .../tests/identity/v2_0/test_project.py | 8 +++++-- openstackclient/tests/identity/v2_0/test_role.py | 12 +++++++--- .../tests/identity/v2_0/test_service.py | 8 +++++-- openstackclient/tests/identity/v2_0/test_user.py | 12 +++++++--- openstackclient/tests/identity/v3/test_catalog.py | 4 +++- openstackclient/tests/identity/v3/test_consumer.py | 4 +++- openstackclient/tests/identity/v3/test_domain.py | 4 +++- openstackclient/tests/identity/v3/test_endpoint.py | 16 +++++++++---- openstackclient/tests/identity/v3/test_group.py | 16 +++++++++---- .../tests/identity/v3/test_identity_provider.py | 4 +++- openstackclient/tests/identity/v3/test_project.py | 12 +++++++--- openstackclient/tests/identity/v3/test_region.py | 8 +++++-- openstackclient/tests/identity/v3/test_role.py | 28 ++++++++++++++++------ .../tests/identity/v3/test_role_assignment.py | 28 ++++++++++++++++------ openstackclient/tests/identity/v3/test_service.py | 8 +++++-- .../tests/identity/v3/test_service_provider.py | 4 +++- openstackclient/tests/identity/v3/test_trust.py | 4 +++- .../tests/identity/v3/test_unscoped_saml.py | 8 +++++-- openstackclient/tests/identity/v3/test_user.py | 20 ++++++++++++---- 21 files changed, 168 insertions(+), 56 deletions(-) (limited to 'openstackclient') diff --git a/openstackclient/tests/identity/v2_0/test_catalog.py b/openstackclient/tests/identity/v2_0/test_catalog.py index ff1d993e..adbf8c30 100644 --- a/openstackclient/tests/identity/v2_0/test_catalog.py +++ b/openstackclient/tests/identity/v2_0/test_catalog.py @@ -72,7 +72,9 @@ class TestCatalogList(TestCatalog): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.sc_mock.service_catalog.get_data.assert_called_with() @@ -114,7 +116,9 @@ class TestCatalogList(TestCatalog): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.sc_mock.service_catalog.get_data.assert_called_with() diff --git a/openstackclient/tests/identity/v2_0/test_endpoint.py b/openstackclient/tests/identity/v2_0/test_endpoint.py index 11696f46..9331b256 100644 --- a/openstackclient/tests/identity/v2_0/test_endpoint.py +++ b/openstackclient/tests/identity/v2_0/test_endpoint.py @@ -164,7 +164,9 @@ class TestEndpointList(TestEndpoint): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.endpoints_mock.list.assert_called_with() @@ -188,7 +190,9 @@ class TestEndpointList(TestEndpoint): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.endpoints_mock.list.assert_called_with() diff --git a/openstackclient/tests/identity/v2_0/test_project.py b/openstackclient/tests/identity/v2_0/test_project.py index 69b29268..ad4ab265 100644 --- a/openstackclient/tests/identity/v2_0/test_project.py +++ b/openstackclient/tests/identity/v2_0/test_project.py @@ -322,7 +322,9 @@ class TestProjectList(TestProject): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.projects_mock.list.assert_called_with() @@ -343,7 +345,9 @@ class TestProjectList(TestProject): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.projects_mock.list.assert_called_with() diff --git a/openstackclient/tests/identity/v2_0/test_role.py b/openstackclient/tests/identity/v2_0/test_role.py index b660c614..f884720f 100644 --- a/openstackclient/tests/identity/v2_0/test_role.py +++ b/openstackclient/tests/identity/v2_0/test_role.py @@ -260,7 +260,9 @@ class TestRoleList(TestRole): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.roles_mock.list.assert_called_with() @@ -330,7 +332,9 @@ class TestUserRoleList(TestRole): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.roles_mock.roles_for_user.assert_called_with( @@ -387,7 +391,9 @@ class TestUserRoleList(TestRole): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.roles_mock.roles_for_user.assert_called_with( diff --git a/openstackclient/tests/identity/v2_0/test_service.py b/openstackclient/tests/identity/v2_0/test_service.py index 9c0cf8cd..27a592d5 100644 --- a/openstackclient/tests/identity/v2_0/test_service.py +++ b/openstackclient/tests/identity/v2_0/test_service.py @@ -214,7 +214,9 @@ class TestServiceList(TestService): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.services_mock.list.assert_called_with() @@ -237,7 +239,9 @@ class TestServiceList(TestService): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.services_mock.list.assert_called_with() diff --git a/openstackclient/tests/identity/v2_0/test_user.py b/openstackclient/tests/identity/v2_0/test_user.py index 0c4370f2..62d78c16 100644 --- a/openstackclient/tests/identity/v2_0/test_user.py +++ b/openstackclient/tests/identity/v2_0/test_user.py @@ -448,7 +448,9 @@ class TestUserList(TestUser): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.users_mock.list.assert_called_with(tenant_id=None) @@ -466,7 +468,9 @@ class TestUserList(TestUser): parsed_args = self.check_parser(self.cmd, arglist, verifylist) project_id = identity_fakes.PROJECT_2['id'] - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.users_mock.list.assert_called_with(tenant_id=project_id) @@ -483,7 +487,9 @@ class TestUserList(TestUser): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.users_mock.list.assert_called_with(tenant_id=None) diff --git a/openstackclient/tests/identity/v3/test_catalog.py b/openstackclient/tests/identity/v3/test_catalog.py index 6bb962de..cfae05a1 100644 --- a/openstackclient/tests/identity/v3/test_catalog.py +++ b/openstackclient/tests/identity/v3/test_catalog.py @@ -68,7 +68,9 @@ class TestCatalogList(TestCatalog): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.sc_mock.service_catalog.get_data.assert_called_with() diff --git a/openstackclient/tests/identity/v3/test_consumer.py b/openstackclient/tests/identity/v3/test_consumer.py index 4e807562..7f6af734 100644 --- a/openstackclient/tests/identity/v3/test_consumer.py +++ b/openstackclient/tests/identity/v3/test_consumer.py @@ -121,7 +121,9 @@ class TestConsumerList(TestOAuth1): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.consumers_mock.list.assert_called_with() diff --git a/openstackclient/tests/identity/v3/test_domain.py b/openstackclient/tests/identity/v3/test_domain.py index 969c2df7..71a48b4e 100644 --- a/openstackclient/tests/identity/v3/test_domain.py +++ b/openstackclient/tests/identity/v3/test_domain.py @@ -215,7 +215,9 @@ class TestDomainList(TestDomain): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.domains_mock.list.assert_called_with() diff --git a/openstackclient/tests/identity/v3/test_endpoint.py b/openstackclient/tests/identity/v3/test_endpoint.py index fb88e004..816f3f92 100644 --- a/openstackclient/tests/identity/v3/test_endpoint.py +++ b/openstackclient/tests/identity/v3/test_endpoint.py @@ -315,7 +315,9 @@ class TestEndpointList(TestEndpoint): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.endpoints_mock.list.assert_called_with() @@ -342,7 +344,9 @@ class TestEndpointList(TestEndpoint): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -374,7 +378,9 @@ class TestEndpointList(TestEndpoint): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -406,7 +412,9 @@ class TestEndpointList(TestEndpoint): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values diff --git a/openstackclient/tests/identity/v3/test_group.py b/openstackclient/tests/identity/v3/test_group.py index 59a36819..c5f5dbca 100644 --- a/openstackclient/tests/identity/v3/test_group.py +++ b/openstackclient/tests/identity/v3/test_group.py @@ -85,7 +85,9 @@ class TestGroupList(TestGroup): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -110,7 +112,9 @@ class TestGroupList(TestGroup): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -135,7 +139,9 @@ class TestGroupList(TestGroup): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -160,7 +166,9 @@ class TestGroupList(TestGroup): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values diff --git a/openstackclient/tests/identity/v3/test_identity_provider.py b/openstackclient/tests/identity/v3/test_identity_provider.py index 50a922b8..75911510 100644 --- a/openstackclient/tests/identity/v3/test_identity_provider.py +++ b/openstackclient/tests/identity/v3/test_identity_provider.py @@ -290,7 +290,9 @@ class TestIdentityProviderList(TestIdentityProvider): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.identity_providers_mock.list.assert_called_with() diff --git a/openstackclient/tests/identity/v3/test_project.py b/openstackclient/tests/identity/v3/test_project.py index 36540201..61b6d2c6 100644 --- a/openstackclient/tests/identity/v3/test_project.py +++ b/openstackclient/tests/identity/v3/test_project.py @@ -464,7 +464,9 @@ class TestProjectList(TestProject): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.projects_mock.list.assert_called_with() @@ -480,7 +482,9 @@ class TestProjectList(TestProject): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.projects_mock.list.assert_called_with() @@ -511,7 +515,9 @@ class TestProjectList(TestProject): parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.projects_mock.list.assert_called_with( domain=identity_fakes.domain_id) diff --git a/openstackclient/tests/identity/v3/test_region.py b/openstackclient/tests/identity/v3/test_region.py index 9ac9ddf8..c54480ee 100644 --- a/openstackclient/tests/identity/v3/test_region.py +++ b/openstackclient/tests/identity/v3/test_region.py @@ -193,7 +193,9 @@ class TestRegionList(TestRegion): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.regions_mock.list.assert_called_with() @@ -209,7 +211,9 @@ class TestRegionList(TestRegion): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.regions_mock.list.assert_called_with( parent_region_id=identity_fakes.region_parent_region_id) diff --git a/openstackclient/tests/identity/v3/test_role.py b/openstackclient/tests/identity/v3/test_role.py index 227b0643..7379fe8b 100644 --- a/openstackclient/tests/identity/v3/test_role.py +++ b/openstackclient/tests/identity/v3/test_role.py @@ -364,7 +364,9 @@ class TestRoleList(TestRole): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.roles_mock.list.assert_called_with() @@ -383,7 +385,9 @@ class TestRoleList(TestRole): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -409,7 +413,9 @@ class TestRoleList(TestRole): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -437,7 +443,9 @@ class TestRoleList(TestRole): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -472,7 +480,9 @@ class TestRoleList(TestRole): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -507,7 +517,9 @@ class TestRoleList(TestRole): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -542,7 +554,9 @@ class TestRoleList(TestRole): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values diff --git a/openstackclient/tests/identity/v3/test_role_assignment.py b/openstackclient/tests/identity/v3/test_role_assignment.py index 5723a334..c7ed289b 100644 --- a/openstackclient/tests/identity/v3/test_role_assignment.py +++ b/openstackclient/tests/identity/v3/test_role_assignment.py @@ -86,7 +86,9 @@ class TestRoleAssignmentList(TestRoleAssignment): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.role_assignments_mock.list.assert_called_with( @@ -146,7 +148,9 @@ class TestRoleAssignmentList(TestRoleAssignment): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.role_assignments_mock.list.assert_called_with( @@ -206,7 +210,9 @@ class TestRoleAssignmentList(TestRoleAssignment): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.role_assignments_mock.list.assert_called_with( @@ -266,7 +272,9 @@ class TestRoleAssignmentList(TestRoleAssignment): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.role_assignments_mock.list.assert_called_with( @@ -326,7 +334,9 @@ class TestRoleAssignmentList(TestRoleAssignment): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.role_assignments_mock.list.assert_called_with( @@ -384,7 +394,9 @@ class TestRoleAssignmentList(TestRoleAssignment): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.role_assignments_mock.list.assert_called_with( @@ -444,7 +456,9 @@ class TestRoleAssignmentList(TestRoleAssignment): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.role_assignments_mock.list.assert_called_with( diff --git a/openstackclient/tests/identity/v3/test_service.py b/openstackclient/tests/identity/v3/test_service.py index c609142c..624606b7 100644 --- a/openstackclient/tests/identity/v3/test_service.py +++ b/openstackclient/tests/identity/v3/test_service.py @@ -225,7 +225,9 @@ class TestServiceList(TestService): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.services_mock.list.assert_called_with() @@ -248,7 +250,9 @@ class TestServiceList(TestService): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.services_mock.list.assert_called_with() diff --git a/openstackclient/tests/identity/v3/test_service_provider.py b/openstackclient/tests/identity/v3/test_service_provider.py index 24fa7c7b..fb7576f1 100644 --- a/openstackclient/tests/identity/v3/test_service_provider.py +++ b/openstackclient/tests/identity/v3/test_service_provider.py @@ -220,7 +220,9 @@ class TestServiceProviderList(TestServiceProvider): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.service_providers_mock.list.assert_called_with() diff --git a/openstackclient/tests/identity/v3/test_trust.py b/openstackclient/tests/identity/v3/test_trust.py index b90e7815..56d4d134 100644 --- a/openstackclient/tests/identity/v3/test_trust.py +++ b/openstackclient/tests/identity/v3/test_trust.py @@ -167,7 +167,9 @@ class TestTrustList(TestTrust): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.trusts_mock.list.assert_called_with() diff --git a/openstackclient/tests/identity/v3/test_unscoped_saml.py b/openstackclient/tests/identity/v3/test_unscoped_saml.py index 6a799094..c2f14493 100644 --- a/openstackclient/tests/identity/v3/test_unscoped_saml.py +++ b/openstackclient/tests/identity/v3/test_unscoped_saml.py @@ -52,7 +52,9 @@ class TestProjectList(TestUnscopedSAML): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.projects_mock.list.assert_called_with() @@ -101,7 +103,9 @@ class TestDomainList(TestUnscopedSAML): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) self.domains_mock.list.assert_called_with() diff --git a/openstackclient/tests/identity/v3/test_user.py b/openstackclient/tests/identity/v3/test_user.py index 641def0e..f77809d0 100644 --- a/openstackclient/tests/identity/v3/test_user.py +++ b/openstackclient/tests/identity/v3/test_user.py @@ -552,7 +552,9 @@ class TestUserList(TestUser): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -577,7 +579,9 @@ class TestUserList(TestUser): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -602,7 +606,9 @@ class TestUserList(TestUser): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -627,7 +633,9 @@ class TestUserList(TestUser): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) # Set expected values @@ -672,7 +680,9 @@ class TestUserList(TestUser): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - # DisplayCommandBase.take_action() returns two tuples + # In base command class Lister in cliff, abstract method take_action() + # returns a tuple containing the column names and an iterable + # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) kwargs = { -- cgit v1.2.1