diff options
author | Zuul <zuul@review.opendev.org> | 2022-12-02 14:21:45 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-12-02 14:21:45 +0000 |
commit | cc481f568b5e20d00ee70675c7288f3f8f278b23 (patch) | |
tree | a72966c5657e0c6b643244757926264ee32e1c2d | |
parent | a5f207b657fd008fc976f8f553dd579eafef62e5 (diff) | |
parent | 6daa6be3926be389cb7cb2faeb921c7230855af3 (diff) | |
download | python-openstackclient-cc481f568b5e20d00ee70675c7288f3f8f278b23.tar.gz |
Merge "tests: Convert identity tests to use 'parse_output'"
-rw-r--r-- | openstackclient/tests/functional/identity/v3/test_project.py | 14 |
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')) |