Skip to content

Commit cc481f5

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "tests: Convert identity tests to use 'parse_output'"
2 parents a5f207b + 6daa6be commit cc481f5

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

openstackclient/tests/functional/identity/v3/test_project.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
# License for the specific language governing permissions and limitations
1111
# under the License.
1212

13-
import json
14-
1513
from tempest.lib.common.utils import data_utils
1614

1715
from openstackclient.tests.functional.identity.v3 import common
@@ -114,12 +112,14 @@ def test_project_show(self):
114112
self.assert_show_fields(items, self.PROJECT_FIELDS)
115113

116114
def test_project_show_with_parents_children(self):
117-
json_output = json.loads(self.openstack(
115+
output = self.openstack(
118116
'project show '
119-
'--parents --children -f json '
117+
'--parents --children '
120118
'--domain %(domain)s '
121119
'%(name)s' % {'domain': self.domain_name,
122-
'name': self.project_name}))
120+
'name': self.project_name},
121+
parse_output=True,
122+
)
123123
for attr_name in (self.PROJECT_FIELDS + ['parents', 'subtree']):
124-
self.assertIn(attr_name, json_output)
125-
self.assertEqual(self.project_name, json_output.get('name'))
124+
self.assertIn(attr_name, output)
125+
self.assertEqual(self.project_name, output.get('name'))

0 commit comments

Comments
 (0)