From cd5ebab4791c5483bf9b05f7651c018a16077037 Mon Sep 17 00:00:00 2001 From: Anton Mokhovikov Date: Fri, 17 Jul 2020 14:54:40 -0700 Subject: [PATCH] asserts that primary id has not got changed throughout update --- 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.