Пример #1
0
    def test_query_job(self):

        self.tps.clean_up()
        self.tps.add_jdoe_in_users()

        job_manager = JobManager(self.settings, self.request.session)
        job_manager.save_query_job('graph_string', '_s3_7B_s3_27variate_s3_27_s3_3A_s3_20_s3_5B_s3_27_s3_3Fvariate_s3_27_s3_5D_s3_7D', 1)

        assert self.tps.test_row_presence('query', 'user_id, state, end, data, file, preview, graph, variates, nrows, error', (1, 'wait', None, None, None, None, 'graph_string', '_s3_7B_s3_27variate_s3_27_s3_3A_s3_20_s3_5B_s3_27_s3_3Fvariate_s3_27_s3_5D_s3_7D', None, None))
Пример #2
0
    def test_list_query_jobs(self):

        self.tps.clean_up()
        self.tps.add_jdoe_in_users()

        job_manager = JobManager(self.settings, self.request.session)
        job_manager.save_query_job('graph_string', '_s3_7B_s3_27variate_s3_27_s3_3A_s3_20_s3_5B_s3_27_s3_3Fvariate_s3_27_s3_5D_s3_7D', 1)
        job_manager.save_query_job('graph_string2', '_s3_7B_s3_27variate_s3_27_s3_3A_s3_20_s3_5B_s3_27_s3_3Fvariate_s3_27_s3_5D_s3_7D', 1)
        job_manager.done_query_job(2, 15, 'data_string2', 'file_string2')

        result = job_manager.list_query_jobs(1)

        assert len(result) == 2
Пример #3
0
    def test_query_job(self):

        self.tps.clean_up()
        self.tps.add_jdoe_in_users()

        job_manager = JobManager(self.settings, self.request.session)
        job_manager.save_query_job(
            'graph_string',
            '_s3_7B_s3_27variate_s3_27_s3_3A_s3_20_s3_5B_s3_27_s3_3Fvariate_s3_27_s3_5D_s3_7D'
        )

        assert self.tps.test_row_presence(
            'query',
            'user_id, state, end, data, file, preview, graph, variates, nrows, error',
            (1, 'wait', None, None, None, None, 'graph_string',
             '_s3_7B_s3_27variate_s3_27_s3_3A_s3_20_s3_5B_s3_27_s3_3Fvariate_s3_27_s3_5D_s3_7D',
             None, None))
Пример #4
0
    def test_list_query_jobs(self):

        self.tps.clean_up()
        self.tps.add_jdoe_in_users()

        job_manager = JobManager(self.settings, self.request.session)
        job_manager.save_query_job(
            'graph_string',
            '_s3_7B_s3_27variate_s3_27_s3_3A_s3_20_s3_5B_s3_27_s3_3Fvariate_s3_27_s3_5D_s3_7D'
        )
        job_manager.save_query_job(
            'graph_string2',
            '_s3_7B_s3_27variate_s3_27_s3_3A_s3_20_s3_5B_s3_27_s3_3Fvariate_s3_27_s3_5D_s3_7D'
        )
        job_manager.done_query_job(2, 15, 'data_string2', 'file_string2')

        result = job_manager.list_query_jobs()

        assert len(result) == 2