test_facility_brick.py 771 Bytes
Newer Older
Wei Shoulin's avatar
c3  
Wei Shoulin committed
1
2
3
import os
import unittest

Wei Shoulin's avatar
brick    
Wei Shoulin committed
4
from csst_dfs_api.facility.brick import BrickApi
Wei Shoulin's avatar
c3  
Wei Shoulin committed
5

Wei Shoulin's avatar
brick    
Wei Shoulin committed
6
class FacilityBrickTestCase(unittest.TestCase):
Wei Shoulin's avatar
c3  
Wei Shoulin committed
7
8

    def setUp(self):
Wei Shoulin's avatar
brick    
Wei Shoulin committed
9
        self.api = BrickApi()
Wei Shoulin's avatar
c3  
Wei Shoulin committed
10
11
12
13
14
15

    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
16
        rec = self.api.get(id=17)
Wei Shoulin's avatar
c3  
Wei Shoulin committed
17
        print('get:', rec)
Wei Shoulin's avatar
Wei Shoulin committed
18
19
        rec = self.api.get(obs_id='0000017')
        print('get:', rec)        
Wei Shoulin's avatar
c3  
Wei Shoulin committed
20
21

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

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