def contract_update_read_success(updated_resource, resource_client): # should be able to use the created model # to read since physical resource id is immutable _create_request, _created_model, _update_request, updated_model = updated_resource assert resource_client.is_primary_identifier_equal( resource_client.primary_identifier_paths, _created_model, updated_model ) test_read_success(resource_client, updated_model)
def contract_update_read(updated_resource, resource_client): # should be able to use the created model # to read since physical resource id is immutable ( _create_request, _created_model, _update_request, updated_model, updated_input_model, ) = updated_resource assert resource_client.is_primary_identifier_equal( resource_client.primary_identifier_paths, _created_model, updated_model), "The primaryIdentifier returned must match\ the primaryIdentifier passed into the request" read_response = test_read_success(resource_client, updated_model) test_input_equals_output(resource_client, updated_input_model, read_response["resourceModel"])
def contract_create_read_success(created_resource, resource_client): created_model, _request = created_resource test_read_success(resource_client, created_model)
def contract_create_list_success(created_resource, resource_client): created_model, _request = created_resource assert test_model_in_list(resource_client, created_model) test_read_success(resource_client, created_model)
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(resource_client, input_model, read_response["resourceModel"])
def contract_update_read_success(updated_resource, resource_client): # should be able to use the created model # to read since physical resource id is immutable _create_request, _created_model, _update_request, updated_model = updated_resource test_read_success(resource_client, updated_model)