def METHOD_NAME(
        client, librarian_martigny, patron_martigny,
        patron2_martigny, loc_public_martigny,
        item_type_standard_martigny, item_lib_martigny, json_header,
        circulation_policies, lib_martigny):
    """Test document with one item."""
    login_user_via_session(client, librarian_martigny.user)
    # checkout first item1 to patron
    res, data = postdata(
        client,
        'api_item.checkout',
        dict(
            item_pid=item_lib_martigny.pid,
            patron_pid=patron_martigny.pid,
            transaction_library_pid=lib_martigny.pid,
            transaction_user_pid=librarian_martigny.pid
        )
    )
    assert res.status_code == 200
    actions = data.get('action_applied')
    loan_pid = actions[LoanAction.CHECKOUT].get('pid')
    # request first item by patron2
    res, data = postdata(
        client,
        'api_item.librarian_request',
        dict(
            item_pid=item_lib_martigny.pid,
            pickup_location_pid=loc_public_martigny.pid,
            patron_pid=patron2_martigny.pid,
            transaction_library_pid=lib_martigny.pid,
            transaction_user_pid=librarian_martigny.pid
        )
    )
    assert res.status_code == 200
    actions = data.get('action_applied')
    loan2_pid = actions[LoanAction.REQUEST].get('pid')
    # checkin the first item
    res, data = postdata(
        client,
        'api_item.checkin',
        dict(
            item_pid=item_lib_martigny.pid,
            pid=loan_pid,
            transaction_location_pid=loc_public_martigny.pid,
            transaction_user_pid=librarian_martigny.pid
        )
    )
    assert res.status_code == 200
    assert item_lib_martigny.number_of_requests() == 1
    res, data = postdata(
        client,
        'api_item.cancel_item_request',
        dict(
            pid=loan2_pid,
            transaction_location_pid=loc_public_martigny.pid,
            transaction_user_pid=librarian_martigny.pid
        )
    )
    assert res.status_code == 200
    assert item_lib_martigny.number_of_requests() == 0