Example #1
0
    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)
Example #2
0
    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)