summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2022-11-08 10:50:20 +0000
committerStephen Finucane <sfinucan@redhat.com>2022-11-29 16:21:29 +0000
commit6daa6be3926be389cb7cb2faeb921c7230855af3 (patch)
tree43c12f3195fe45bd9e7b50732db8fd2f71cdee57
parent686fabef31ee36ec25574ddb086d6e9e3f170045 (diff)
downloadpython-openstackclient-6daa6be3926be389cb7cb2faeb921c7230855af3.tar.gz
tests: Convert identity tests to use 'parse_output'
Change-Id: I10711b911986af0348946f6254cf36773110b0ab
-rw-r--r--openstackclient/tests/functional/identity/v3/test_project.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/openstackclient/tests/functional/identity/v3/test_project.py b/openstackclient/tests/functional/identity/v3/test_project.py
index 27cf4481..b3d31aa7 100644
--- a/openstackclient/tests/functional/identity/v3/test_project.py
+++ b/openstackclient/tests/functional/identity/v3/test_project.py
@@ -10,8 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import json
-
from tempest.lib.common.utils import data_utils
from openstackclient.tests.functional.identity.v3 import common
@@ -114,12 +112,14 @@ class ProjectTests(common.IdentityTests):
self.assert_show_fields(items, self.PROJECT_FIELDS)
def test_project_show_with_parents_children(self):
- json_output = json.loads(self.openstack(
+ output = self.openstack(
'project show '
- '--parents --children -f json '
+ '--parents --children '
'--domain %(domain)s '
'%(name)s' % {'domain': self.domain_name,
- 'name': self.project_name}))
+ 'name': self.project_name},
+ parse_output=True,
+ )
for attr_name in (self.PROJECT_FIELDS + ['parents', 'subtree']):
- self.assertIn(attr_name, json_output)
- self.assertEqual(self.project_name, json_output.get('name'))
+ self.assertIn(attr_name, output)
+ self.assertEqual(self.project_name, output.get('name'))