Skip to content

Commit

Permalink
asserts that primary id has not got changed throughout update (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
ammokhov authored Jul 20, 2020
1 parent cdb6760 commit 4fa2c01
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rpdk/core/contract/suite/handler_commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ def test_update_success(resource_client, update_model, current_model):
_status, response, _error_code = resource_client.call_and_assert(
Action.UPDATE, OperationStatus.SUCCESS, update_model, current_model
)
resource_client.is_primary_identifier_equal(
resource_client.primary_identifier_paths,
current_model,
response["resourceModel"],
)
resource_client.assert_write_only_property_does_not_exist(response["resourceModel"])
# The response model should be the same as the create output model,
# except the update-able properties should be overridden.
Expand Down

0 comments on commit 4fa2c01

Please sign in to comment.