Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
antonhibl committed Jul 17, 2023
1 parent 0c46fcc commit 687f120
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tests/pytests/test_clementine_drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_uvvis_load(test_uvvis_kernels):
label_file = get_image_label('LUD3125I.161', 'isis3')
isd_str = ale.loads(label_file, props={'kernels': test_uvvis_kernels, 'exact_ck_times': False})
isd_obj = json.loads(isd_str)
compare_isd = get_isd('uvvis')
compare_isd = get_isd('clementine')
assert compare_dicts(isd_obj, compare_isd) == []

# ========= Test uvvis isislabel and naifspice driver =========
Expand All @@ -33,22 +33,18 @@ def setUp(self):
self.driver = ClementineUvvisIsisLabelNaifSpiceDriver(label)

def test_instrument_id(self):
assert self.driver.instrument_id == "UVVIS"
assert self.driver.instrument_id == "ULTRAVIOLET/VISIBLE CAMERA"

def test_ephemeris_start_time(self):
with patch('ale.drivers.uvvis_drivers.spice.utc2et', return_value=12345) as scs2e:
with patch('ale.drivers.clementine_drivers.spice.utc2et', return_value=12345) as scs2e:
assert self.driver.ephemeris_start_time == 12345

def test_ephemeris_stop_time(self):
with patch('ale.drivers.uvvis_drivers.spice.utc2et', return_value=12345) as scs2e:
assert self.driver.ephemeris_stop_time == 12345
with patch('ale.drivers.clementine_drivers.spice.utc2et', return_value=12345) as scs2e:
assert self.driver.ephemeris_stop_time >= 12345

def test_spacecraft_name(self):
assert self.driver.sensor_name == "CLEMENTINE 1" # this is probly not correct

def test_sensor_name(self):
filter = self.label["IsisCube"]['BandBin']['FilterName']
assert self.driver.sensor_name == "CLEM_" + super().self.instrument_id + "_" + filter
assert self.driver.sensor_name == "CLEM_UVVIS_D" # this is probly not correct

def test_sensor_model_version(self):
assert self.driver.sensor_model_version == 1
Expand Down

0 comments on commit 687f120

Please sign in to comment.