mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Latest wins when both retrofit design doc candidates have OSM 🟩
This commit is contained in:
parent
aff79d4151
commit
3fe85a635c
1 changed files with 23 additions and 0 deletions
|
|
@ -139,6 +139,29 @@ def test_select_latest_core_files_osm_candidate_wins_over_non_osm() -> None:
|
|||
assert result[CoreFiles.RETROFIT_DESIGN_DOC].file_name == "2512-OSM-H21M900-XX-DR-N-A_Lord Nelson Street 018.pdf"
|
||||
|
||||
|
||||
def test_select_latest_core_files_picks_latest_when_both_candidates_have_osm() -> None:
|
||||
# Arrange
|
||||
client = make_client()
|
||||
files = [
|
||||
make_file(
|
||||
file_name="2512-OSM-H21M900-XX-DR-N-A_Lord Nelson Street 018.pdf",
|
||||
evidence_category="retrofit design",
|
||||
created_utc="2024-01-01T00:00:00",
|
||||
),
|
||||
make_file(
|
||||
file_name="2603-OSM-B06M901-XX-DR-N-A_Alvaston Walk 022.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 == "2603-OSM-B06M901-XX-DR-N-A_Alvaston Walk 022.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