Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Jan 24, 2024
1 parent dec996b commit 8aa916b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions tests/integration/studies_blueprint/test_study_matrix_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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",
}
Expand All @@ -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
14 changes: 7 additions & 7 deletions tests/storage/business/test_study_service_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions tests/storage/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8aa916b

Please sign in to comment.