Commit ad1d3c4b authored by Wei Shoulin's avatar Wei Shoulin
Browse files

uncomment

parent a0ca5a82
......@@ -9,25 +9,25 @@ class IFSResult0TestCase(unittest.TestCase):
def setUp(self):
self.api = Result0Api()
# def test_find(self):
# recs = self.api.find(file_name='CCD2_ObsTime_1200_ObsNum_40.fits')
# print('find:', recs)
# assert len(recs) == 1
# recs = self.api.find()
# print('find:', recs)
# assert len(recs) > 1
# def test_read(self):
# recs = self.api.find(file_name='CCD2_ObsTime_1200_ObsNum_40.fits')
# print("The full path: ", os.path.join(self.api.root_dir, recs[0]['file_path']))
# file_segments = self.api.read(file_path=recs[0]['file_path'])
# file_bytes = b''.join(file_segments)
# hdul = fits.HDUList.fromstring(file_bytes)
# print(hdul.info())
# hdr = hdul[0].header
# print(repr(hdr))
def test_find(self):
recs = self.api.find(file_name='CCD2_ObsTime_1200_ObsNum_40.fits')
print('find:', recs)
assert len(recs) == 1
recs = self.api.find()
print('find:', recs)
assert len(recs) > 1
def test_read(self):
recs = self.api.find(file_name='CCD2_ObsTime_1200_ObsNum_40.fits')
print("The full path: ", os.path.join(self.api.root_dir, recs[0]['file_path']))
file_segments = self.api.read(file_path=recs[0]['file_path'])
file_bytes = b''.join(file_segments)
hdul = fits.HDUList.fromstring(file_bytes)
print(hdul.info())
hdr = hdul[0].header
print(repr(hdr))
def test_write(self):
self.api.write(raw_id = 1,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment