mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Name the packaged file by Document Type with the original extension 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
bd928828e3
commit
63933db529
1 changed files with 12 additions and 0 deletions
|
|
@ -64,3 +64,15 @@ def test_skips_and_reports_a_document_with_no_document_type() -> None:
|
|||
skipped = plan.skipped[0]
|
||||
assert skipped.s3_key == "mystery.bin"
|
||||
assert skipped.landlord_property_id == "LP1"
|
||||
|
||||
|
||||
def test_packaged_filename_is_the_document_type_with_the_original_extension() -> None:
|
||||
# Arrange — a photo pack stored under a prefixed key with a .zip extension;
|
||||
# the file inside the archive should be named by type but stay openable.
|
||||
doc = _doc(document_type="photo_pack", s3_key="surveys/2026/pack.zip")
|
||||
|
||||
# Act
|
||||
plan = plan_download_package([doc])
|
||||
|
||||
# Assert
|
||||
assert plan.entries[0].zip_path == "12 Oak Street (LP1)/photo_pack.zip"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue