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

        assert self.tps.test_row_presence('integration', 'user_id, filename, state, end, error', (1, 'file.tsv', 'wait', None, None))
Example #2
0
    def test_save_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')

        assert self.tps.test_row_presence(
            'integration', 'user_id, filename, state, end, error',
            (1, 'file.tsv', 'wait', None, None))
Example #3
0
    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
Example #4
0
    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