def _get_csv_(self):
# todo: get the csv.reader to handle unicode as done here:
# http://docs.python.org/library/csv.html#examples
url = reverse('csv_export', kwargs={
'username': self.user.username, 'id_string': self.xform.id_string})
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
actual_csv = self._get_response_content(response)
actual_lines = actual_csv.split("\n")
return csv.reader(actual_lines)
评论列表
文章目录