Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-api-cluster
Commits
dfa8873a
Commit
dfa8873a
authored
Jun 07, 2021
by
Wei Shoulin
Browse files
c3
parent
6ebbd274
Changes
21
Hide whitespace changes
Inline
Side-by-side
tests/test_msc_level1.py
0 → 100644
View file @
dfa8873a
import
os
import
unittest
from
astropy.io
import
fits
from
csst_dfs_api_cluster.msc.level1
import
Level1DataApi
class
MSCLevel1DataTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
api
=
Level1DataApi
()
def
test_find
(
self
):
recs
=
self
.
api
.
find
(
raw_id
=
1
,
create_time
=
(
"2021-06-01 11:12:13"
,
"2021-06-08 11:12:13"
))
print
(
'find:'
,
recs
)
def
test_get
(
self
):
rec
=
self
.
api
.
get
(
id
=
2
)
print
(
'get:'
,
rec
)
def
test_update_proc_status
(
self
):
rec
=
self
.
api
.
update_proc_status
(
id
=
2
,
status
=
4
)
print
(
'update_proc_status:'
,
rec
)
def
test_update_qc1_status
(
self
):
rec
=
self
.
api
.
update_qc1_status
(
id
=
2
,
status
=
7
)
print
(
'update_qc1_status:'
,
rec
)
def
test_write
(
self
):
rec
=
self
.
api
.
write
(
raw_id
=
1
,
data_type
=
"sci"
,
cor_sci_id
=
1
,
prc_params
=
"/opt/dddasd.params"
,
flat_id
=
1
,
dark_id
=
2
,
bias_id
=
3
,
prc_status
=
3
,
prc_time
=
'2021-06-04 11:12:13'
,
filename
=
"dddasd"
,
file_path
=
"/opt/dddasd.fits"
,
pipeline_id
=
"P1"
)
print
(
'write:'
,
rec
)
\ No newline at end of file
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment