From 15f6ad2d435531b727d4290b89375f9f9bdc17f8 Mon Sep 17 00:00:00 2001 From: Pat Myron Date: Tue, 6 Jul 2021 15:49:39 -0700 Subject: [PATCH] standardizing contract test names (#556) Co-authored-by: Anshika Garg --- src/rpdk/core/contract/suite/handler_create.py | 6 +++--- src/rpdk/core/contract/suite/handler_update.py | 4 ++-- src/rpdk/core/contract/suite/handler_update_invalid.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rpdk/core/contract/suite/handler_create.py b/src/rpdk/core/contract/suite/handler_create.py index 0d66cf6a..066e185f 100644 --- a/src/rpdk/core/contract/suite/handler_create.py +++ b/src/rpdk/core/contract/suite/handler_create.py @@ -51,14 +51,14 @@ def contract_create_delete(resource_client): @pytest.mark.create @skip_not_writable_identifier -def contract_create_duplicate(created_resource, resource_client): +def contract_create_create(created_resource, resource_client): _input_model, _created_model, request = created_resource test_create_failure_if_repeat_writeable_id(resource_client, request) @pytest.mark.create @pytest.mark.read -def contract_create_read_success(created_resource, resource_client): +def contract_create_read(created_resource, resource_client): input_model, created_model, _request = created_resource read_response = test_read_success(resource_client, created_model) test_input_equals_output( @@ -69,7 +69,7 @@ def contract_create_read_success(created_resource, resource_client): @pytest.mark.create @pytest.mark.list @pytest.mark.read -def contract_create_list_success(created_resource, resource_client): +def contract_create_list(created_resource, resource_client): _input_model, created_model, _request = created_resource assert test_model_in_list(resource_client, created_model) test_read_success(resource_client, created_model) diff --git a/src/rpdk/core/contract/suite/handler_update.py b/src/rpdk/core/contract/suite/handler_update.py index 39486eec..776992fb 100644 --- a/src/rpdk/core/contract/suite/handler_update.py +++ b/src/rpdk/core/contract/suite/handler_update.py @@ -41,7 +41,7 @@ def updated_resource(resource_client): @pytest.mark.update @pytest.mark.read -def contract_update_read_success(updated_resource, resource_client): +def contract_update_read(updated_resource, resource_client): # should be able to use the created model # to read since physical resource id is immutable ( @@ -63,7 +63,7 @@ def contract_update_read_success(updated_resource, resource_client): @pytest.mark.update @pytest.mark.list -def contract_update_list_success(updated_resource, resource_client): +def contract_update_list(updated_resource, resource_client): # should be able to use the created model # to read since physical resource id is immutable ( diff --git a/src/rpdk/core/contract/suite/handler_update_invalid.py b/src/rpdk/core/contract/suite/handler_update_invalid.py index 4ee349f9..ed4fe068 100644 --- a/src/rpdk/core/contract/suite/handler_update_invalid.py +++ b/src/rpdk/core/contract/suite/handler_update_invalid.py @@ -15,7 +15,7 @@ msg="An update handler MUST return FAILED with a NotFound error code\ if the resource did not exist prior to the update request", ) -def contract_update_non_existent_resource(resource_client): +def contract_update_without_create(resource_client): create_request = resource_client.generate_create_example() update_request = resource_client.generate_update_example(create_request) _status, response, _error = resource_client.call_and_assert(