예제 #1
0
 def test_custom_delimiter(self):
     q = SimpleQueryFactory(sql='select 1, 2')
     exporter = CSVExporter(query=q)
     res = exporter.get_output(delim='|')
     self.assertEqual(res, '1|2\r\n1|2\r\n')
예제 #2
0
 def test_custom_delimiter(self):
     q = SimpleQueryFactory(sql="select 1, 2")
     exporter = CSVExporter(query=q)
     res = exporter.get_output(delim="|")
     self.assertEqual(res, "1|2\r\n1|2\r\n")
예제 #3
0
 def test_custom_delimiter(self):
     q = SimpleQueryFactory(sql='select 1, 2')
     exporter = CSVExporter(query=q)
     res = exporter.get_output(delim='|')
     self.assertEqual(res, '1|2\r\n1|2\r\n')
 def test_writing_bom(self):
     q = SimpleQueryFactory(sql='select 1, 2')
     exporter = CSVExporter(query=q)
     res = exporter.get_output()
     self.assertEqual(res, '\ufeff1,2\r\n1,2\r\n')