import random


def constrained_sum_sample_pos(n, total):
    """
    Return a randomly chosen list of n positive integers summing to total.
    Each such list is equally likely to occur.

    Parameters
    ----------
    n : int
        Number of chosen integers
    total : int
        Sum of all entries of result list

    Returns
    -------
    results_list : list (of int)
        List with result integers, which sum up to value 'total'
    """

    dividers = sorted(random.sample(range(1, int(total)), int(n - 1)))
    list_occ = [a - b for a, b in zip(dividers + [total], [0] + dividers)]

    for i in range(len(list_occ)):
        list_occ[i] = int(list_occ[i])

    return list_occ