def coerce_list_of_ints(val):
    if isinstance(val, list):
        return [int(x) for x in val]
    else:
        return [int(val)]
If single value, try to parse as integer, else try to parse as list of integer
dataset/ETHPy150Open svanoort/pyresttest/pyresttest/tests.py/coerce_list_of_ints