mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Latest wins as fallback when no OSM retrofit design doc candidates 🟩
This commit is contained in:
parent
3fe85a635c
commit
9a04d89cae
1 changed files with 23 additions and 0 deletions
|
|
@ -162,6 +162,29 @@ def test_select_latest_core_files_picks_latest_when_both_candidates_have_osm() -
|
|||
assert result[CoreFiles.RETROFIT_DESIGN_DOC].file_name == "2603-OSM-B06M901-XX-DR-N-A_Alvaston Walk 022.pdf"
|
||||
|
||||
|
||||
def test_select_latest_core_files_falls_back_to_latest_when_no_osm_candidates() -> None:
|
||||
# Arrange
|
||||
client = make_client()
|
||||
files = [
|
||||
make_file(
|
||||
file_name="retrofit_design_v1.pdf",
|
||||
evidence_category="retrofit design",
|
||||
created_utc="2024-01-01T00:00:00",
|
||||
),
|
||||
make_file(
|
||||
file_name="retrofit_design_v2.pdf",
|
||||
evidence_category="retrofit design",
|
||||
created_utc="2024-06-01T00:00:00",
|
||||
),
|
||||
]
|
||||
|
||||
# Act
|
||||
result = client._select_latest_core_files(files)
|
||||
|
||||
# Assert
|
||||
assert result[CoreFiles.RETROFIT_DESIGN_DOC].file_name == "retrofit_design_v2.pdf"
|
||||
|
||||
|
||||
def test_get_core_file_type_evidence_category_match_is_case_insensitive() -> None:
|
||||
# Arrange
|
||||
client = make_client()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue