Skip to content

Commit

Permalink
standardizing contract test names (aws-cloudformation#556)
Browse files Browse the repository at this point in the history
Co-authored-by: Anshika Garg <[email protected]>
  • Loading branch information
2 people authored and kddejong committed Oct 24, 2022
1 parent 7995ae6 commit c0b6042
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/rpdk/core/contract/suite/handler_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)
4 changes: 2 additions & 2 deletions src/rpdk/core/contract/suite/handler_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
(
Expand All @@ -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
(
Expand Down
2 changes: 1 addition & 1 deletion src/rpdk/core/contract/suite/handler_update_invalid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c0b6042

Please sign in to comment.