From 02ac292424307a833ba3088a04e862c6ee494fc6 Mon Sep 17 00:00:00 2001 From: "Adam.Dybbroe" Date: Thu, 13 Jul 2023 22:02:32 +0200 Subject: [PATCH] Fix broken test Signed-off-by: Adam.Dybbroe --- activefires_pp/tests/test_fires_filtering.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/activefires_pp/tests/test_fires_filtering.py b/activefires_pp/tests/test_fires_filtering.py index cb7328e..4a70eda 100644 --- a/activefires_pp/tests/test_fires_filtering.py +++ b/activefires_pp/tests/test_fires_filtering.py @@ -243,6 +243,7 @@ def test_regional_fires_filtering(setup_comm, get_config, gethostname): mymask_file = "/my/shape/file/with/polygons/to/filter/out" afpp = ActiveFiresPostprocessing(myconfigfile, myborders_file, mymask_file) + afpp._initialize_fire_detection_id() fstream = io.StringIO(TEST_ACTIVE_FIRES_FILE_DATA) afdata = pd.read_csv(fstream, index_col=None, header=None, comment='#', names=COL_NAMES) @@ -253,6 +254,8 @@ def test_regional_fires_filtering(setup_comm, get_config, gethostname): afdata['starttime'] = np.repeat(starttime, len(afdata)).astype(np.datetime64) afdata['endtime'] = np.repeat(endtime, len(afdata)).astype(np.datetime64) + afdata = afpp.add_unique_day_id(afdata) + # Add metadata to the pandas dataframe: fake_metadata = {'platform': 'j01', 'start_time': datetime(2021, 4, 14, 11, 26, 43, 900000), @@ -374,7 +377,6 @@ def test_get_feature_collection_from_firedata(readdata, setup_comm, mymask_file = "/my/shape/file/with/polygons/to/filter/out" afpp = ActiveFiresPostprocessing(myconfigfile, myborders_file, mymask_file) - # afpp._fire_detection_id = {'date': datetime(2023, 6, 17, 11, 55, 0), 'counter': 1} afpp._initialize_fire_detection_id() myfilepath = TEST_ACTIVE_FIRES_FILEPATH2