From 42ac82b1a4970da688ea8fe6c1eb35c87bae8652 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Tue, 24 Jan 2017 00:10:51 -0500 Subject: change assert_show_fields to not fail on new fields whenever a resource adds a field (which is allowed in our API guidelines), OSC functional tests fail, because we validate the resource keys to a hardcoded list. instead, this change proposes that the logic of assert_show_fields is flipped around, so our hardcoded list acts as a minimum set of values that must appear in the resource. as part of this change, some fields were remove from the constants since they were not actually in the returned data. also, delete unused code `assert_show_structure`. Change-Id: I8c0f0e80ea472f9c7f93c5f1f0ae52048e6cd7da --- openstackclient/tests/functional/identity/v3/common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'openstackclient/tests/functional/identity/v3') diff --git a/openstackclient/tests/functional/identity/v3/common.py b/openstackclient/tests/functional/identity/v3/common.py index 3b6fc27b..a509574c 100644 --- a/openstackclient/tests/functional/identity/v3/common.py +++ b/openstackclient/tests/functional/identity/v3/common.py @@ -23,15 +23,15 @@ BASIC_LIST_HEADERS = ['ID', 'Name'] class IdentityTests(base.TestCase): """Functional tests for Identity commands. """ - DOMAIN_FIELDS = ['description', 'enabled', 'id', 'name', 'links'] - GROUP_FIELDS = ['description', 'domain_id', 'id', 'name', 'links'] + DOMAIN_FIELDS = ['description', 'enabled', 'id', 'name'] + GROUP_FIELDS = ['description', 'domain_id', 'id', 'name'] TOKEN_FIELDS = ['expires', 'id', 'project_id', 'user_id'] USER_FIELDS = ['email', 'enabled', 'id', 'name', 'name', 'domain_id', 'default_project_id', 'description', 'password_expires_at'] PROJECT_FIELDS = ['description', 'id', 'domain_id', 'is_domain', - 'enabled', 'name', 'parent_id', 'links'] - ROLE_FIELDS = ['id', 'name', 'links', 'domain_id'] + 'enabled', 'name', 'parent_id'] + ROLE_FIELDS = ['id', 'name', 'domain_id'] SERVICE_FIELDS = ['id', 'enabled', 'name', 'type', 'description'] REGION_FIELDS = ['description', 'enabled', 'parent_region', 'region'] ENDPOINT_FIELDS = ['id', 'region', 'region_id', 'service_id', -- cgit v1.2.1