def contract_delete_list(resource_client, deleted_resource):
    # LIST: Should not fail after deletion, since it is a list of all
    #       current resources of the resource type. Deletion should
    #       remove the model from the list, however.

    deleted_model, _request = deleted_resource
    list_models = test_list_success(resource_client, deleted_model)
    assert deleted_model not in list_models
Ejemplo n.º 2
0
def contract_update_list_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
    resource_client.assert_primary_identifier_not_updated(
        resource_client.primary_identifier_paths, _created_model,
        updated_model)
    models = test_list_success(resource_client, updated_model)
    assert updated_model in models
Ejemplo n.º 3
0
def contract_create_list_success(created_resource, resource_client):
    created_model, _request = created_resource
    models = test_list_success(resource_client, created_model)
    assert created_model in models
def contract_update_list_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
    models = test_list_success(resource_client, updated_model)
    assert updated_model in models