def test_no_header(self): result = list(utils.make_csv_reader(self.testfile1, header=False)) expected = [ ['col1', 'col2', 'col3'], ['this', 'value\tis', 'awesome'], ['this', 'one\tis', 'too'] ] self.assertEqual(result, expected)
def test_sniffing_comma_delim(self): result = list(utils.make_csv_reader(self.testfile1)) expected = [ { 'col1': 'this', 'col2': 'value\tis', 'col3': 'awesome' }, { 'col1': 'this', 'col2': 'one\tis', 'col3': 'too' } ] self.assertEqual(result, expected)