diff --git a/test/test_GUNW.py b/test/test_GUNW.py index 0ef0781c1..1e091f0d3 100644 --- a/test/test_GUNW.py +++ b/test/test_GUNW.py @@ -194,12 +194,10 @@ def test_azimuth_timing_against_interpolation(weather_model_name: str, mocker.patch('hyp3lib.get_orb.downloadSentinelOrbitFile', # Hyp3 Lib returns 2 values side_effect=[ - # For center time - (orbit_dict_for_azimuth_time_test['reference'], ''), - (orbit_dict_for_azimuth_time_test['secondary'], ''), # For azimuth time (orbit_dict_for_azimuth_time_test['reference'], ''), (orbit_dict_for_azimuth_time_test['secondary'], ''), + (orbit_dict_for_azimuth_time_test['secondary'], ''), ] ) @@ -216,12 +214,13 @@ def test_azimuth_timing_against_interpolation(weather_model_name: str, # These outputs are not needed since the orbits are specified above mocker.patch('RAiDER.s1_azimuth_timing.get_slc_id_from_point_and_time', - return_value=[ - # Center_time - ['reference_slc_id'], ['secondary_slc_id'], - # Azimuth time - ['reference_slc_id'], ['secondary_slc_id'], - ]) + side_effect=[ + # Azimuth time + ['reference_slc_id'], + # using two "dummy" ids to mimic GUNW sec granules + # See docstring + ['secondary_slc_id', 'secondary_slc_id'], + ]) side_effect = (weather_model_dict_for_center_time_test[weather_model_name] + weather_model_dict_for_azimuth_time_test[weather_model_name]) @@ -246,7 +245,9 @@ def test_azimuth_timing_against_interpolation(weather_model_name: str, # Calls 6 times for azimuth time and 4 times for center time assert RAiDER.processWM.prepareWeatherModel.call_count == 10 # Only calls for azimuth timing for reference and secondary - assert hyp3lib.get_orb.downloadSentinelOrbitFile.call_count == 4 + assert hyp3lib.get_orb.downloadSentinelOrbitFile.call_count == 3 + # Only calls for azimuth timing: once for ref and sec + assert RAiDER.s1_azimuth_timing.get_slc_id_from_point_and_time.call_count == 2 # Once for center-time and azimuth-time each assert eof.download.download_eofs.call_count == 2