mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
OSM candidate wins over non-OSM retrofit design doc 🟥
This commit is contained in:
parent
506dc92aa3
commit
b685008e5e
1 changed files with 23 additions and 0 deletions
|
|
@ -116,6 +116,29 @@ def test_select_latest_core_files_returns_single_retrofit_design_doc() -> 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_osm_candidate_wins_over_non_osm() -> None:
|
||||
# Arrange - the non-OSM file is newer but should lose to the OSM file
|
||||
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="Retrofit Design Doc non-osm variant.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 == "2512-OSM-H21M900-XX-DR-N-A_Lord Nelson Street 018.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