test_ifs_refs.py 771 Bytes
Newer Older
Xie Zhou's avatar
Xie Zhou committed
1
2
# import logging
# import unittest
Xie Zhou's avatar
update  
Xie Zhou committed
3

Xie Zhou's avatar
Xie Zhou committed
4
# from csst_dfs_api_local.ifs import RefFitsApi
Xie Zhou's avatar
update  
Xie Zhou committed
5

Xie Zhou's avatar
Xie Zhou committed
6
7
# log = logging.getLogger('csst')
# class IFSFitsTestCase(unittest.TestCase):
Xie Zhou's avatar
update  
Xie Zhou committed
8

Xie Zhou's avatar
Xie Zhou committed
9
10
11
#     def setUp(self):
#         self.api = RefFitsApi()
#         self.api.scan2db()
Xie Zhou's avatar
update  
Xie Zhou committed
12

Xie Zhou's avatar
Xie Zhou committed
13
14
15
16
17
18
#     def test_find(self):
#         path = self.api.find(obs_time=300, type='Flat')
#         log.info('find', path)
#         path = self.api.find(fits_id='CCD1_Flat_img.fits')
#         print(path)
#         log.info('find', path)
Xie Zhou's avatar
update  
Xie Zhou committed
19
    
Xie Zhou's avatar
Xie Zhou committed
20
21
22
23
24
25
#     def test_read(self):
#         file = self.api.read(fits_id='CCD1_Flat_img.fits')
#         log.info('read', str(type(file)))
#         path = self.api.find(obs_time=300, type='Flat')
#         file = self.api.read(file_path=path)
#         log.info('read', str(type(file)))