From 664c9b91fa9e280766dbadda11a065b6c044d0a9 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 14 May 2026 07:38:43 +0000 Subject: [PATCH] delete incorrect comment in test --- .../pashub_fetcher/tests/test_core_files.py | 51 ++++++++++++++----- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/backend/pashub_fetcher/tests/test_core_files.py b/backend/pashub_fetcher/tests/test_core_files.py index f8e8b431..8715f6ca 100644 --- a/backend/pashub_fetcher/tests/test_core_files.py +++ b/backend/pashub_fetcher/tests/test_core_files.py @@ -1,6 +1,5 @@ from backend.pashub_fetcher.core_files import infer_file_type - # --- GREEN: pre-existing file types (startswith match) --- @@ -13,15 +12,22 @@ def test_infer_sitenote(): def test_infer_rdsap_sitenote(): - assert infer_file_type("RdSAP_SiteNote_9510890_V1_Assessmet.pdf") == "rd_sap_site_note" + assert ( + infer_file_type("RdSAP_SiteNote_9510890_V1_Assessmet.pdf") == "rd_sap_site_note" + ) def test_infer_pas2023_ventilation(): - assert infer_file_type("PAS 2023 Ventilation Assessment Report_123456.pdf") == "pas_2023_ventilation" + assert ( + infer_file_type("PAS 2023 Ventilation Assessment Report_123456.pdf") + == "pas_2023_ventilation" + ) def test_infer_pas2023_condition(): - assert infer_file_type("PAS 2023 Condition Report_123456.pdf") == "pas_2023_condition" + assert ( + infer_file_type("PAS 2023 Condition Report_123456.pdf") == "pas_2023_condition" + ) def test_infer_pas_significance(): @@ -29,34 +35,51 @@ def test_infer_pas_significance(): def test_infer_par_photopack(): - assert infer_file_type("PAR Photo Pack_95101890_V2_Assessment.pdf") == "par_photo_pack" + assert ( + infer_file_type("PAR Photo Pack_95101890_V2_Assessment.pdf") == "par_photo_pack" + ) def test_infer_pas2023_property(): - assert infer_file_type("PAS 2023 Property Assessment Report_123456.pdf") == "pas_2023_property" + assert ( + infer_file_type("PAS 2023 Property Assessment Report_123456.pdf") + == "pas_2023_property" + ) def test_infer_pas2023_occupancy(): - assert infer_file_type("PAS 2023 Occupancy Assessment Report_123456.pdf") == "pas_2023_occupancy" + assert ( + infer_file_type("PAS 2023 Occupancy Assessment Report_123456.pdf") + == "pas_2023_occupancy" + ) def test_infer_unknown_returns_none(): assert infer_file_type("unknown_document_123.pdf") is None -# --- RED: new file types (suffix match not yet implemented) --- - - def test_infer_improvement_option_evaluation(): # filename: "{job_id} - {postcode} - Improvement Option Evaluation.pdf" - assert infer_file_type("6000802 - NG4 4HD - Improvement Option Evaluation.pdf") == "improvement_option_evaluation" + assert ( + infer_file_type("6000802 - NG4 4HD - Improvement Option Evaluation.pdf") + == "improvement_option_evaluation" + ) def test_infer_medium_term_improvement_plan(): # filename: "{job_id} - {postcode} - Medium Term Improvement Plan IOE.pdf" - assert infer_file_type("60800802 - NG4 4HD - Medium Term Improvement Plan IOE.pdf") == "medium_term_improvement_plan" + assert ( + infer_file_type("60800802 - NG4 4HD - Medium Term Improvement Plan IOE.pdf") + == "medium_term_improvement_plan" + ) def test_infer_retrofit_design_doc(): - assert infer_file_type("2512-OSM-H21M900-XX-DR-N-A_Lord Nelson Street 018.pdf") == "retrofit_design_doc" - assert infer_file_type("2603-OSM-B06M901-XX-DR-N-A_Alvaston Walk 022.pdf") == "retrofit_design_doc" + assert ( + infer_file_type("2512-OSM-H21M900-XX-DR-N-A_Lord Nelson Street 018.pdf") + == "retrofit_design_doc" + ) + assert ( + infer_file_type("2603-OSM-B06M901-XX-DR-N-A_Alvaston Walk 022.pdf") + == "retrofit_design_doc" + )