diff --git a/satip/filenames.py b/satip/filenames.py index cf7341aa..c8b1bda1 100644 --- a/satip/filenames.py +++ b/satip/filenames.py @@ -13,7 +13,6 @@ def get_datetime_from_filename(filename: str, strip_hrv: bool = False) -> pd.Tim """ filename = filename.replace("iodc_", "") - filename = filename.replace("15_", "") if strip_hrv: filename = filename.replace("hrv_", "") diff --git a/tests/unit_test/test_filenames.py b/tests/unit_test/test_filenames.py index 5af00fd7..b08cfc2e 100644 --- a/tests/unit_test/test_filenames.py +++ b/tests/unit_test/test_filenames.py @@ -14,10 +14,10 @@ def test_get_time_from_filename(): assert datetime == "hrv_202408261815" datetime = get_datetime_from_filename("folder/15_hrv_202408261815.zarr.zip") - assert datetime == "hrv_202408261815" + assert datetime == "15_hrv_202408261815" datetime = get_datetime_from_filename("folder/hrv_202408261815.zarr.zip", strip_hrv=True) assert datetime == pd.Timestamp("2024-08-26 18:15", tz="UTC") datetime = get_datetime_from_filename("folder/15_hrv_202408261815.zarr.zip", strip_hrv=True) - assert datetime == pd.Timestamp("2024-08-26 18:15", tz="UTC") + assert datetime == "15_202408261815"