summaryrefslogtreecommitdiff
path: root/openstackclient/tests
diff options
context:
space:
mode:
authorTang Chen <chen.tang@easystack.cn>2016-02-10 23:11:58 +0800
committerTang Chen <chen.tang@easystack.cn>2016-02-10 23:11:58 +0800
commit9f71b777ac7357c96ac7fa662ba18fa67b93baa0 (patch)
tree98da8f285ee45a78b9c1574f75a785405a47339d /openstackclient/tests
parentd0c0cefb84b4d7abff23e7e313acd9725df1be9b (diff)
downloadpython-openstackclient-9f71b777ac7357c96ac7fa662ba18fa67b93baa0.tar.gz
Identity: Fix DisplayCommandBase comments for cliff ShowOne 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 3 in all identity tests. Change-Id: I1f05e833cdacd30915954e4220b6e1f16ac1ed40 Closes-bug: #1477199
Diffstat (limited to 'openstackclient/tests')
-rw-r--r--openstackclient/tests/identity/v2_0/test_catalog.py4
-rw-r--r--openstackclient/tests/identity/v2_0/test_endpoint.py8
-rw-r--r--openstackclient/tests/identity/v2_0/test_project.py32
-rw-r--r--openstackclient/tests/identity/v2_0/test_role.py20
-rw-r--r--openstackclient/tests/identity/v2_0/test_service.py20
-rw-r--r--openstackclient/tests/identity/v2_0/test_token.py4
-rw-r--r--openstackclient/tests/identity/v2_0/test_user.py40
-rw-r--r--openstackclient/tests/identity/v3/test_catalog.py4
-rw-r--r--openstackclient/tests/identity/v3/test_domain.py20
-rw-r--r--openstackclient/tests/identity/v3/test_endpoint.py20
-rw-r--r--openstackclient/tests/identity/v3/test_project.py28
-rw-r--r--openstackclient/tests/identity/v3/test_region.py16
-rw-r--r--openstackclient/tests/identity/v3/test_role.py8
-rw-r--r--openstackclient/tests/identity/v3/test_service.py20
-rw-r--r--openstackclient/tests/identity/v3/test_token.py8
-rw-r--r--openstackclient/tests/identity/v3/test_trust.py8
-rw-r--r--openstackclient/tests/identity/v3/test_user.py40
17 files changed, 225 insertions, 75 deletions
diff --git a/openstackclient/tests/identity/v2_0/test_catalog.py b/openstackclient/tests/identity/v2_0/test_catalog.py
index adbf8c30..1e27bb3c 100644
--- a/openstackclient/tests/identity/v2_0/test_catalog.py
+++ b/openstackclient/tests/identity/v2_0/test_catalog.py
@@ -150,7 +150,9 @@ class TestCatalogShow(TestCatalog):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
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 9331b256..088fdcd1 100644
--- a/openstackclient/tests/identity/v2_0/test_endpoint.py
+++ b/openstackclient/tests/identity/v2_0/test_endpoint.py
@@ -69,7 +69,9 @@ class TestEndpointCreate(TestEndpoint):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# EndpointManager.create(region, service_id, publicurl, adminurl,
@@ -243,7 +245,9 @@ class TestEndpointShow(TestEndpoint):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# EndpointManager.list()
diff --git a/openstackclient/tests/identity/v2_0/test_project.py b/openstackclient/tests/identity/v2_0/test_project.py
index ad4ab265..669c3eab 100644
--- a/openstackclient/tests/identity/v2_0/test_project.py
+++ b/openstackclient/tests/identity/v2_0/test_project.py
@@ -70,7 +70,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -96,7 +98,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -124,7 +128,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -152,7 +158,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -180,7 +188,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -221,7 +231,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# ProjectManager.create(name, description, enabled)
@@ -251,7 +263,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -553,7 +567,9 @@ class TestProjectShow(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
self.projects_mock.get.assert_called_with(
identity_fakes.project_id,
diff --git a/openstackclient/tests/identity/v2_0/test_role.py b/openstackclient/tests/identity/v2_0/test_role.py
index f884720f..03b7f924 100644
--- a/openstackclient/tests/identity/v2_0/test_role.py
+++ b/openstackclient/tests/identity/v2_0/test_role.py
@@ -86,7 +86,9 @@ class TestRoleAdd(TestRole):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# RoleManager.add_user_role(user, role, tenant=None)
@@ -137,7 +139,9 @@ class TestRoleCreate(TestRole):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# RoleManager.create(name)
@@ -171,7 +175,9 @@ class TestRoleCreate(TestRole):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# RoleManager.get(name, description, enabled)
@@ -196,7 +202,9 @@ class TestRoleCreate(TestRole):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# RoleManager.create(name)
@@ -484,7 +492,9 @@ class TestRoleShow(TestRole):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# RoleManager.get(role)
diff --git a/openstackclient/tests/identity/v2_0/test_service.py b/openstackclient/tests/identity/v2_0/test_service.py
index 27a592d5..606b1433 100644
--- a/openstackclient/tests/identity/v2_0/test_service.py
+++ b/openstackclient/tests/identity/v2_0/test_service.py
@@ -69,7 +69,9 @@ class TestServiceCreate(TestService):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# ServiceManager.create(name, service_type, description)
@@ -95,7 +97,9 @@ class TestServiceCreate(TestService):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# ServiceManager.create(name, service_type, description)
@@ -121,7 +125,9 @@ class TestServiceCreate(TestService):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# ServiceManager.create(name, service_type, description)
@@ -148,7 +154,9 @@ class TestServiceCreate(TestService):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# ServiceManager.create(name, service_type, description)
@@ -280,7 +288,9 @@ class TestServiceShow(TestService):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# ServiceManager.get(id)
diff --git a/openstackclient/tests/identity/v2_0/test_token.py b/openstackclient/tests/identity/v2_0/test_token.py
index ce2faef3..7687a063 100644
--- a/openstackclient/tests/identity/v2_0/test_token.py
+++ b/openstackclient/tests/identity/v2_0/test_token.py
@@ -43,7 +43,9 @@ class TestTokenIssue(TestToken):
verifylist = []
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
self.sc_mock.get_token.assert_called_with()
diff --git a/openstackclient/tests/identity/v2_0/test_user.py b/openstackclient/tests/identity/v2_0/test_user.py
index 62d78c16..a7332e63 100644
--- a/openstackclient/tests/identity/v2_0/test_user.py
+++ b/openstackclient/tests/identity/v2_0/test_user.py
@@ -83,7 +83,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -114,7 +116,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -143,7 +147,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
mocker = mock.Mock()
mocker.return_value = 'abc123'
with mock.patch("openstackclient.common.utils.get_password", mocker):
@@ -176,7 +182,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -221,7 +229,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -259,7 +269,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -290,7 +302,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -332,7 +346,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# UserManager.create(name, password, email, tenant_id=, enabled=)
@@ -352,7 +368,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -758,7 +776,9 @@ class TestUserShow(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
self.users_mock.get.assert_called_with(identity_fakes.user_id)
diff --git a/openstackclient/tests/identity/v3/test_catalog.py b/openstackclient/tests/identity/v3/test_catalog.py
index cfae05a1..a03c9d3e 100644
--- a/openstackclient/tests/identity/v3/test_catalog.py
+++ b/openstackclient/tests/identity/v3/test_catalog.py
@@ -103,7 +103,9 @@ class TestCatalogShow(TestCatalog):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
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_domain.py b/openstackclient/tests/identity/v3/test_domain.py
index 71a48b4e..9de6b26a 100644
--- a/openstackclient/tests/identity/v3/test_domain.py
+++ b/openstackclient/tests/identity/v3/test_domain.py
@@ -63,7 +63,9 @@ class TestDomainCreate(TestDomain):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -90,7 +92,9 @@ class TestDomainCreate(TestDomain):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -117,7 +121,9 @@ class TestDomainCreate(TestDomain):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -144,7 +150,9 @@ class TestDomainCreate(TestDomain):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -382,7 +390,9 @@ class TestDomainShow(TestDomain):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
self.domains_mock.get.assert_called_with(
identity_fakes.domain_id,
diff --git a/openstackclient/tests/identity/v3/test_endpoint.py b/openstackclient/tests/identity/v3/test_endpoint.py
index 816f3f92..1c481930 100644
--- a/openstackclient/tests/identity/v3/test_endpoint.py
+++ b/openstackclient/tests/identity/v3/test_endpoint.py
@@ -81,7 +81,9 @@ class TestEndpointCreate(TestEndpoint):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -126,7 +128,9 @@ class TestEndpointCreate(TestEndpoint):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -170,7 +174,9 @@ class TestEndpointCreate(TestEndpoint):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -214,7 +220,9 @@ class TestEndpointCreate(TestEndpoint):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -673,7 +681,9 @@ class TestEndpointShow(TestEndpoint):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
self.endpoints_mock.get.assert_called_with(
identity_fakes.endpoint_id,
diff --git a/openstackclient/tests/identity/v3/test_project.py b/openstackclient/tests/identity/v3/test_project.py
index 61b6d2c6..b834e943 100644
--- a/openstackclient/tests/identity/v3/test_project.py
+++ b/openstackclient/tests/identity/v3/test_project.py
@@ -83,7 +83,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -125,7 +127,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -159,7 +163,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -225,7 +231,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -258,7 +266,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -290,7 +300,9 @@ class TestProjectCreate(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -743,7 +755,9 @@ class TestProjectShow(TestProject):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
self.projects_mock.get.assert_called_with(
identity_fakes.project_id,
diff --git a/openstackclient/tests/identity/v3/test_region.py b/openstackclient/tests/identity/v3/test_region.py
index c54480ee..f5f50793 100644
--- a/openstackclient/tests/identity/v3/test_region.py
+++ b/openstackclient/tests/identity/v3/test_region.py
@@ -64,7 +64,9 @@ class TestRegionCreate(TestRegion):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -89,7 +91,9 @@ class TestRegionCreate(TestRegion):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -116,7 +120,9 @@ class TestRegionCreate(TestRegion):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -320,7 +326,9 @@ class TestRegionShow(TestRegion):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
self.regions_mock.get.assert_called_with(
identity_fakes.region_id,
diff --git a/openstackclient/tests/identity/v3/test_role.py b/openstackclient/tests/identity/v3/test_role.py
index 7379fe8b..f3661324 100644
--- a/openstackclient/tests/identity/v3/test_role.py
+++ b/openstackclient/tests/identity/v3/test_role.py
@@ -258,7 +258,9 @@ class TestRoleCreate(TestRole):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -812,7 +814,9 @@ class TestRoleShow(TestRole):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# RoleManager.get(role)
diff --git a/openstackclient/tests/identity/v3/test_service.py b/openstackclient/tests/identity/v3/test_service.py
index 624606b7..2bc5927f 100644
--- a/openstackclient/tests/identity/v3/test_service.py
+++ b/openstackclient/tests/identity/v3/test_service.py
@@ -73,7 +73,9 @@ class TestServiceCreate(TestService):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# ServiceManager.create(name=, type=, enabled=, **kwargs)
@@ -101,7 +103,9 @@ class TestServiceCreate(TestService):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# ServiceManager.create(name=, type=, enabled=, **kwargs)
@@ -129,7 +133,9 @@ class TestServiceCreate(TestService):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# ServiceManager.create(name=, type=, enabled=, **kwargs)
@@ -157,7 +163,9 @@ class TestServiceCreate(TestService):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# ServiceManager.create(name=, type=, enabled=, **kwargs)
@@ -469,7 +477,9 @@ class TestServiceShow(TestService):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# ServiceManager.get(id)
diff --git a/openstackclient/tests/identity/v3/test_token.py b/openstackclient/tests/identity/v3/test_token.py
index 6ad4845d..25019e86 100644
--- a/openstackclient/tests/identity/v3/test_token.py
+++ b/openstackclient/tests/identity/v3/test_token.py
@@ -44,7 +44,9 @@ class TestTokenIssue(TestToken):
self.sc_mock.get_token.return_value = \
identity_fakes.TOKEN_WITH_PROJECT_ID
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
self.sc_mock.get_token.assert_called_with()
@@ -66,7 +68,9 @@ class TestTokenIssue(TestToken):
self.sc_mock.get_token.return_value = \
identity_fakes.TOKEN_WITH_DOMAIN_ID
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
self.sc_mock.get_token.assert_called_with()
diff --git a/openstackclient/tests/identity/v3/test_trust.py b/openstackclient/tests/identity/v3/test_trust.py
index 56d4d134..2a748872 100644
--- a/openstackclient/tests/identity/v3/test_trust.py
+++ b/openstackclient/tests/identity/v3/test_trust.py
@@ -81,7 +81,9 @@ class TestTrustCreate(TestTrust):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -211,7 +213,9 @@ class TestTrustShow(TestTrust):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
self.trusts_mock.get.assert_called_with(identity_fakes.trust_id)
diff --git a/openstackclient/tests/identity/v3/test_user.py b/openstackclient/tests/identity/v3/test_user.py
index f77809d0..3757c5f8 100644
--- a/openstackclient/tests/identity/v3/test_user.py
+++ b/openstackclient/tests/identity/v3/test_user.py
@@ -104,7 +104,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -141,7 +143,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -176,7 +180,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
mocker = mock.Mock()
mocker.return_value = 'abc123'
with mock.patch("openstackclient.common.utils.get_password", mocker):
@@ -214,7 +220,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -264,7 +272,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -324,7 +334,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -367,7 +379,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -401,7 +415,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -435,7 +451,9 @@ class TestUserCreate(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
# Set expected values
@@ -1073,7 +1091,9 @@ class TestUserShow(TestUser):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
- # DisplayCommandBase.take_action() returns two tuples
+ # In base command class ShowOne in cliff, abstract method take_action()
+ # returns a two-part tuple with a tuple of column names and a tuple of
+ # data to be shown.
columns, data = self.cmd.take_action(parsed_args)
self.users_mock.get.assert_called_with(identity_fakes.user_id)