Exemple #1
0
def contract_create_delete(resource_client):
    requested_model = delete_model = resource_client.generate_create_example()
    try:
        response = test_create_success(resource_client, requested_model)
        # check response here
        delete_model = response["resourceModel"]
    finally:
        test_delete_success(resource_client, delete_model)
def contract_create_delete(resource_client):
    requested_model = (
        delete_model
    ) = input_model = resource_client.generate_create_example()
    try:
        response = test_create_success(resource_client, requested_model)
        # check response here
        delete_model = response["resourceModel"]
        test_input_equals_output(resource_client, input_model, delete_model)
    finally:
        test_delete_success(resource_client, delete_model)