test_facility_level1_prc.py 796 Bytes
Newer Older
Wei Shoulin's avatar
Wei Shoulin committed
1
2
3
4
import os
import unittest
from astropy.io import fits

Wei Shoulin's avatar
Wei Shoulin committed
5
from csst_dfs_api.facility.level1prc import Level1PrcApi
Wei Shoulin's avatar
Wei Shoulin committed
6

Wei Shoulin's avatar
Wei Shoulin committed
7
class Level1PrcTestCase(unittest.TestCase):
Wei Shoulin's avatar
Wei Shoulin committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

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

    def test_find(self):
        recs = self.api.find(level1_id=1)
        print('find:', recs)

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

    def test_write(self):
        rec = self.api.write(level1_id=1, 
            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)