diff --git a/src/rpdk/core/contract/suite/handler_update_invalid.py b/src/rpdk/core/contract/suite/handler_update_invalid.py index a967be80..4ee349f9 100644 --- a/src/rpdk/core/contract/suite/handler_update_invalid.py +++ b/src/rpdk/core/contract/suite/handler_update_invalid.py @@ -9,41 +9,6 @@ from rpdk.core.contract.suite.contract_asserts import failed_event -@pytest.mark.update -@failed_event( - error_code=(HandlerErrorCode.NotUpdatable, HandlerErrorCode.NotFound), - msg="An update hander MUST return FAILED with a NotUpdatable error code \ - if the difference between the previous state and the properties included \ - in the request contains a property defined in the createOnlyProperties \ - in the resource schema", -) -def contract_update_create_only_property(resource_client): - - if resource_client.create_only_paths: - create_request = resource_client.generate_create_example() - try: - _status, response, _error = resource_client.call_and_assert( - Action.CREATE, OperationStatus.SUCCESS, create_request - ) - created_model = response["resourceModel"] - update_request = resource_client.generate_invalid_update_example( - created_model - ) - _status, response, _error_code = resource_client.call_and_assert( - Action.UPDATE, OperationStatus.FAILED, update_request, created_model - ) - assert response[ - "message" - ], "The progress event MUST return an error message\ - when the status is failed" - finally: - resource_client.call_and_assert( - Action.DELETE, OperationStatus.SUCCESS, created_model - ) - else: - pytest.skip("No createOnly Properties. Skipping test.") - - @pytest.mark.update @failed_event( error_code=HandlerErrorCode.NotFound,