def get_categorized_testlist(alltests, ucat):
    """ Sort the master test list into categories. """
    testcases = dict()

    for category in ucat:
        testcases[category] = list(filter(lambda x: category in x['category'], alltests))

    return(testcases)