From 4fa2c019442d1b319f73d53ede34c2f76b837c1b Mon Sep 17 00:00:00 2001 From: Anton Mokhovikov Date: Mon, 20 Jul 2020 15:35:01 -0700 Subject: [PATCH] asserts that primary id has not got changed throughout update (#498) --- src/rpdk/core/contract/suite/handler_commons.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rpdk/core/contract/suite/handler_commons.py b/src/rpdk/core/contract/suite/handler_commons.py index 3625b549..b906c1ca 100644 --- a/src/rpdk/core/contract/suite/handler_commons.py +++ b/src/rpdk/core/contract/suite/handler_commons.py @@ -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.