test_cpic_level0_prc.py 817 Bytes
Newer Older
Wei Shoulin's avatar
Wei Shoulin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import os
import unittest
from astropy.io import fits

from csst_dfs_api.cpic.level0prc import Level0PrcApi

class CPICLevel0PrcTestCase(unittest.TestCase):

    def setUp(self):
        self.api = Level0PrcApi()

    def test_find(self):
        recs = self.api.find(level0_id='134')
        print('find:', recs)

    def test_update_proc_status(self):
        rec = self.api.update_proc_status(id = 8, status = 4)
        print('update_proc_status:', rec)

    def test_write(self):
        rec = self.api.write(
            level0_id='134', 
            pipeline_id = "P1",
            prc_module = "QC0",
            params_file_path = "/opt/dddasd.params",
            prc_status = 3,
            prc_time = '2021-06-04 11:12:13',
            result_file_path = "/opt/dddasd.header")
        print('write:', rec)