def _assertTaskProducesCSVBase(self, user, model, assert_fields_and_values): job = ExportJob(instance=self.instance, user=user) job.save() tasks.async_csv_export(job.pk, model, "", "") # Refresh model with outfile job = ExportJob.objects.get(pk=job.pk) self.assertCSVRowValue(job.outfile, 1, assert_fields_and_values)
def _assertTaskProducesCSVBase(self, user, model, assert_fields_and_values): job = ExportJob(instance=self.instance, user=user) job.save() tasks.async_csv_export(job.pk, model, '', '') # Refresh model with outfile job = ExportJob.objects.get(pk=job.pk) self.assertCSVRowValue(job.outfile, 1, assert_fields_and_values)