mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
delete incorrect comment in test
This commit is contained in:
parent
16af543560
commit
664c9b91fa
1 changed files with 37 additions and 14 deletions
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue