From 8aa916b175761cc1a5a03ee53e9e9f2632d1835b Mon Sep 17 00:00:00 2001 From: belthlemar Date: Wed, 24 Jan 2024 18:29:55 +0100 Subject: [PATCH] fix tests --- .../studies_blueprint/test_study_matrix_index.py | 10 +++++----- tests/storage/business/test_study_service_utils.py | 14 +++++++------- tests/storage/test_service.py | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/integration/studies_blueprint/test_study_matrix_index.py b/tests/integration/studies_blueprint/test_study_matrix_index.py index 69880cb357..4aeacceff4 100644 --- a/tests/integration/studies_blueprint/test_study_matrix_index.py +++ b/tests/integration/studies_blueprint/test_study_matrix_index.py @@ -33,7 +33,7 @@ def test_get_study_matrix_index( expected = { "first_week_size": 7, "level": "hourly", - "start_date": "2001-01-01 00:00:00", + "start_date": "2018-01-01 00:00:00", "steps": 8760, } assert actual == expected @@ -50,7 +50,7 @@ def test_get_study_matrix_index( expected = { "first_week_size": 7, "level": "daily", - "start_date": "2001-01-01 00:00:00", + "start_date": "2018-01-01 00:00:00", "steps": 365, } assert actual == expected @@ -67,7 +67,7 @@ def test_get_study_matrix_index( expected = { "first_week_size": 7, "level": "hourly", - "start_date": "2001-01-01 00:00:00", + "start_date": "2018-01-01 00:00:00", "steps": 8760, } assert actual == expected @@ -80,7 +80,7 @@ def test_get_study_matrix_index( actual = res.json() expected = { "first_week_size": 7, - "start_date": "2001-01-01 00:00:00", + "start_date": "2018-01-01 00:00:00", "steps": 8760, "level": "hourly", } @@ -96,5 +96,5 @@ def test_get_study_matrix_index( ) assert res.status_code == 200 actual = res.json() - expected = {"first_week_size": 7, "start_date": "2001-01-01 00:00:00", "steps": 7, "level": "daily"} + expected = {"first_week_size": 7, "start_date": "2018-01-01 00:00:00", "steps": 7, "level": "daily"} assert actual == expected diff --git a/tests/storage/business/test_study_service_utils.py b/tests/storage/business/test_study_service_utils.py index 623f17a55e..dcd674e0e3 100644 --- a/tests/storage/business/test_study_service_utils.py +++ b/tests/storage/business/test_study_service_utils.py @@ -104,7 +104,7 @@ def test_output_downloads_export(tmp_path: Path): }, StudyDownloadLevelDTO.WEEKLY, MatrixIndex( - start_date=str(datetime.datetime(2001, 1, 1)), + start_date=str(datetime.datetime(2018, 1, 1)), steps=51, first_week_size=7, level=StudyDownloadLevelDTO.WEEKLY, @@ -121,7 +121,7 @@ def test_output_downloads_export(tmp_path: Path): }, StudyDownloadLevelDTO.WEEKLY, MatrixIndex( - start_date=str(datetime.datetime(2002, 7, 5)), + start_date=str(datetime.datetime(2019, 7, 5)), steps=48, first_week_size=5, level=StudyDownloadLevelDTO.WEEKLY, @@ -138,7 +138,7 @@ def test_output_downloads_export(tmp_path: Path): }, StudyDownloadLevelDTO.MONTHLY, MatrixIndex( - start_date=str(datetime.datetime(2002, 7, 1)), + start_date=str(datetime.datetime(2019, 7, 1)), steps=7, first_week_size=7, level=StudyDownloadLevelDTO.MONTHLY, @@ -155,7 +155,7 @@ def test_output_downloads_export(tmp_path: Path): }, StudyDownloadLevelDTO.MONTHLY, MatrixIndex( - start_date=str(datetime.datetime(2002, 7, 1)), + start_date=str(datetime.datetime(2019, 7, 1)), steps=4, first_week_size=7, level=StudyDownloadLevelDTO.MONTHLY, @@ -172,7 +172,7 @@ def test_output_downloads_export(tmp_path: Path): }, StudyDownloadLevelDTO.HOURLY, MatrixIndex( - start_date=str(datetime.datetime(2010, 3, 5)), + start_date=str(datetime.datetime(2021, 3, 5)), steps=2304, first_week_size=3, level=StudyDownloadLevelDTO.HOURLY, @@ -189,7 +189,7 @@ def test_output_downloads_export(tmp_path: Path): }, StudyDownloadLevelDTO.ANNUAL, MatrixIndex( - start_date=str(datetime.datetime(2010, 3, 5)), + start_date=str(datetime.datetime(2021, 3, 5)), steps=1, first_week_size=3, level=StudyDownloadLevelDTO.ANNUAL, @@ -206,7 +206,7 @@ def test_output_downloads_export(tmp_path: Path): }, StudyDownloadLevelDTO.DAILY, MatrixIndex( - start_date=str(datetime.datetime(2009, 3, 3)), + start_date=str(datetime.datetime(2026, 3, 3)), steps=98, first_week_size=3, level=StudyDownloadLevelDTO.DAILY, diff --git a/tests/storage/test_service.py b/tests/storage/test_service.py index b509445052..34a3223d98 100644 --- a/tests/storage/test_service.py +++ b/tests/storage/test_service.py @@ -555,7 +555,7 @@ def test_download_output() -> None: # AREA TYPE res_matrix = MatrixAggregationResultDTO( index=MatrixIndex( - start_date="2001-01-01 00:00:00", + start_date="2018-01-01 00:00:00", steps=1, first_week_size=7, level=StudyDownloadLevelDTO.ANNUAL, @@ -615,7 +615,7 @@ def test_download_output() -> None: input_data.filter = ["east>west"] res_matrix = MatrixAggregationResultDTO( index=MatrixIndex( - start_date="2001-01-01 00:00:00", + start_date="2018-01-01 00:00:00", steps=1, first_week_size=7, level=StudyDownloadLevelDTO.ANNUAL, @@ -645,7 +645,7 @@ def test_download_output() -> None: input_data.filterIn = "n" res_matrix = MatrixAggregationResultDTO( index=MatrixIndex( - start_date="2001-01-01 00:00:00", + start_date="2018-01-01 00:00:00", steps=1, first_week_size=7, level=StudyDownloadLevelDTO.ANNUAL,