From 3afaa3a0ae1691587fdc1a0d0c4297ae2c39e594 Mon Sep 17 00:00:00 2001 From: Pat Myron Date: Thu, 27 Aug 2020 20:26:30 -0700 Subject: [PATCH] standardizing contract test names --- 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 efbaf928..ff449f2b 100644 --- a/src/rpdk/core/contract/suite/handler_create.py +++ b/src/rpdk/core/contract/suite/handler_create.py @@ -81,14 +81,14 @@ def _create_with_invalid_model(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): _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): created_model, _request = created_resource test_read_success(resource_client, created_model) @@ -96,7 +96,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): 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 636052ac..fd331971 100644 --- a/src/rpdk/core/contract/suite/handler_update.py +++ b/src/rpdk/core/contract/suite/handler_update.py @@ -45,7 +45,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 _create_request, _created_model, _update_request, updated_model = updated_resource @@ -57,7 +57,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 _create_request, _created_model, _update_request, updated_model = updated_resource diff --git a/src/rpdk/core/contract/suite/handler_update_invalid.py b/src/rpdk/core/contract/suite/handler_update_invalid.py index 5637fccc..a98cc9a5 100644 --- a/src/rpdk/core/contract/suite/handler_update_invalid.py +++ b/src/rpdk/core/contract/suite/handler_update_invalid.py @@ -45,7 +45,7 @@ def contract_update_create_only_property(resource_client): error_code=HandlerErrorCode.NotFound, msg="cannot update a resource which does not exist", ) -def contract_update_non_existent_resource(resource_client): +def contract_update_without_create(resource_client): create_request = resource_client.generate_invalid_create_example() update_request = resource_client.generate_update_example(create_request) _status, response, _error = resource_client.call_and_assert(