import six


def csv_data_with_term(term):
    """ Data where each line is terminated by term """
    stream = six.StringIO()
    data = [
        'idx,data',
        '1,one',
        '2,two',
        '3,three',
    ]
    for line in data:
        stream.write(line + term)
    stream.seek(0)
    return stream