From cc6461045bddf804460cac310d03c39dd27ba462 Mon Sep 17 00:00:00 2001 From: Laurent LAPORTE Date: Fri, 9 Feb 2024 00:04:02 +0100 Subject: [PATCH] refactor(api-download): correct spelling in unit tests --- .../raw_studies_blueprint/test_download_matrices.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/raw_studies_blueprint/test_download_matrices.py b/tests/integration/raw_studies_blueprint/test_download_matrices.py index 23147dbf05..9b9a269702 100644 --- a/tests/integration/raw_studies_blueprint/test_download_matrices.py +++ b/tests/integration/raw_studies_blueprint/test_download_matrices.py @@ -88,7 +88,9 @@ def test_download_matrices(self, client: TestClient, admin_access_token: str, st # check time coherence generated_index = dataframe.index + # noinspection PyUnresolvedReferences first_date = generated_index[0].to_pydatetime() + # noinspection PyUnresolvedReferences second_date = generated_index[1].to_pydatetime() assert first_date.month == second_date.month == 1 if uuid == parent_id else 7 assert first_date.day == second_date.day == 1 @@ -206,8 +208,8 @@ def test_download_matrices(self, client: TestClient, admin_access_token: str, st dataframe = pd.read_csv(content, index_col=0, sep="\t") assert dataframe.index[0] == "2018-01-01 00:00:00" dataframe.index = range(len(dataframe)) - liste_transposee = list(zip(*[8760 * [1.0], 8760 * [1.0], 8760 * [1.0], 8760 * [0.0]])) - expected_df = pd.DataFrame(columns=["0", "1", "2", "3"], index=range(8760), data=liste_transposee) + transposed_matrix = list(zip(*[8760 * [1.0], 8760 * [1.0], 8760 * [1.0], 8760 * [0.0]])) + expected_df = pd.DataFrame(columns=["0", "1", "2", "3"], index=range(8760), data=transposed_matrix) assert dataframe.equals(expected_df) # asserts endpoint returns the right columns for output matrix @@ -222,6 +224,7 @@ def test_download_matrices(self, client: TestClient, admin_access_token: str, st assert res.status_code == 200 content = io.BytesIO(res.content) dataframe = pd.read_csv(content, index_col=0, sep="\t") + # noinspection SpellCheckingInspection assert list(dataframe.columns) == [ "('FLOW LIN.', 'MWh', '')", "('UCAP LIN.', 'MWh', '')",