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

add functional

parent 67343023
...@@ -7,7 +7,8 @@ def find_observation( ...@@ -7,7 +7,8 @@ def find_observation(
obs_time : tuple = (None, None), obs_time : tuple = (None, None),
qc0_status : int = -1, qc0_status : int = -1,
prc_status : int = -1) -> Result: prc_status : int = -1) -> Result:
return ObservationApi().find() kwarg = locals()
return ObservationApi().find(**kwarg)
def find_level0(obs_id: str = '', def find_level0(obs_id: str = '',
module_id: str = '', module_id: str = '',
...@@ -23,4 +24,5 @@ def find_level0(obs_id: str = '', ...@@ -23,4 +24,5 @@ def find_level0(obs_id: str = '',
radius: float = None, radius: float = None,
object_name: str = None, object_name: str = None,
version: str = None) -> Result: version: str = None) -> Result:
return Level0DataApi().find() kwarg = locals()
return Level0DataApi().find(**kwarg)
\ No newline at end of file
import unittest
from csst_dfs_api import functional as F
class CommonUtilsTestCase(unittest.TestCase):
def setUp(self):
pass
def test_find_observation(self):
result = F.find_observation(module_id='MSC')
print(result)
assert result.success, result.message
def test_find_level0(self):
result = F.find_level0()
print(result)
assert result.success, result.message
\ No newline at end of file
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