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)
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
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)