'Test simple csv output'

def test_basic_csv_output(self):

    data = [[u'first', u'second']]
    checker = Checker(dict.fromkeys(self.check))
    setattr(checker, self.check[0], data)
    stdout = StringIO()
    _print_check_library_results(checker, self.check, as_csv=True, out=stdout)
    result = stdout.getvalue().split(u'\n')
    parsed_result = [l for l in csv.reader(result) if l]
    self.assertEqual(parsed_result, [[self.check[1], data[0][0], data[0][1]]])
