Beispiel #1
0
 def analyse_empty(self, presenter, project_id):
     """Analyse empty results."""
     analyst = self._analysts.get(presenter)()
     if not analyst:
         msg = 'Invalid task presenter: {}'.format(presenter)
         raise AnalysisException(msg)
     analyst.analyse_empty(project_id)
     project_export(project_id)
Beispiel #2
0
 def test_project_export_none(self, csv_exporter, json_exporter):
     """Test JOB project_export without project works."""
     project_export(0)
     assert not csv_exporter.pregenerate_zip_files.called
     assert not json_exporter.pregenerate_zip_files.called
Beispiel #3
0
 def test_project_export_none(self, csv_exporter, json_exporter):
     """Test JOB project_export without project works."""
     project_export(0)
     assert not csv_exporter.pregenerate_zip_files.called
     assert not json_exporter.pregenerate_zip_files.called
Beispiel #4
0
 def test_project_export(self, csv_exporter, json_exporter):
     """Test JOB project_export works."""
     project = ProjectFactory.create()
     project_export(project.id)
     csv_exporter.pregenerate_zip_files.assert_called_once_with(project)
     json_exporter.pregenerate_zip_files.assert_called_once_with(project)
Beispiel #5
0
 def test_project_export(self, csv_exporter, json_exporter):
     """Test JOB project_export works."""
     project = ProjectFactory.create()
     project_export(project.id)
     csv_exporter.pregenerate_zip_files.assert_called_once_with(project)
     json_exporter.pregenerate_zip_files.assert_called_once_with(project)