test_facility_observation.py 823 Bytes
Newer Older
Wei Shoulin's avatar
c3  
Wei Shoulin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os
import unittest
from astropy.io import fits

from csst_dfs_api.facility.observation import ObservationApi

class FacilityObservationTestCase(unittest.TestCase):

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

    def test_find(self):
        recs = self.api.find(module_id="MSC",limit = 0)
        print('find:', recs)

    def test_get(self):
Wei Shoulin's avatar
Wei Shoulin committed
17
        rec = self.api.get(id=17)
Wei Shoulin's avatar
c3  
Wei Shoulin committed
18
        print('get:', rec)
Wei Shoulin's avatar
Wei Shoulin committed
19
20
        rec = self.api.get(obs_id='0000017')
        print('get:', rec)        
Wei Shoulin's avatar
c3  
Wei Shoulin committed
21
22

    def test_update_proc_status(self):
Wei Shoulin's avatar
Wei Shoulin committed
23
        rec = self.api.update_proc_status(obs_id='0000017', status = 3, )
Wei Shoulin's avatar
c3  
Wei Shoulin committed
24
25
26
        print('update_proc_status:', rec)

    def test_update_qc0_status(self):
Wei Shoulin's avatar
Wei Shoulin committed
27
        rec = self.api.update_qc0_status(obs_id='0000017', status = 3, )
Wei Shoulin's avatar
c3  
Wei Shoulin committed
28
        print('update_qc0_status:', rec)