def test_done_integration_job(self): self.tps.clean_up() self.tps.add_jdoe_in_users() job_manager = JobManager(self.settings, self.request.session) job_manager.save_integration_job('file.tsv', 1) job_manager.done_integration_job(1) assert self.tps.test_row_presence('integration', 'user_id, filename, state, error', (1, 'file.tsv', 'done', None))
def test_done_integration_job(self): self.tps.clean_up() self.tps.add_jdoe_in_users() job_manager = JobManager(self.settings, self.request.session) job_manager.save_integration_job('file.tsv') job_manager.done_integration_job(1) assert self.tps.test_row_presence('integration', 'user_id, filename, state, error', (1, 'file.tsv', 'done', None))
def test_list_integration_jobs(self): self.tps.clean_up() self.tps.add_jdoe_in_users() job_manager = JobManager(self.settings, self.request.session) job_manager.save_integration_job('file.tsv') job_manager.save_integration_job('file2.tsv') job_manager.done_integration_job(2) result = job_manager.list_integration_jobs() assert len(result) == 2
def test_list_integration_jobs(self): self.tps.clean_up() self.tps.add_jdoe_in_users() job_manager = JobManager(self.settings, self.request.session) job_manager.save_integration_job('file.tsv', 1) job_manager.save_integration_job('file2.tsv', 1) job_manager.done_integration_job(2) result = job_manager.list_integration_jobs(1) assert len(result) == 2