def objects_from_attrs(mocker):
    """Takes a list of lists with tuples of (attr_name, value)
       and creates a listed of Mock objects with their attributes
       set to those values
    """
    def fn(attr_list):
        things_with_attrs = []
        for attr_tuples in attr_list:
            with_attr = mocker.Mock()
            for (attr_name, attr_value) in attr_tuples:
                setattr(with_attr, attr_name, attr_value)
            things_with_attrs.append(with_attr)
        return things_with_attrs
    return fn