From 63933db529d1b9b70dd2d13bcc073981b47597dc Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 8 Jul 2026 09:06:51 +0000 Subject: [PATCH] =?UTF-8?q?Name=20the=20packaged=20file=20by=20Document=20?= =?UTF-8?q?Type=20with=20the=20original=20extension=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- .../bulk_document_download/test_package_plan.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/domain/bulk_document_download/test_package_plan.py b/tests/domain/bulk_document_download/test_package_plan.py index a81e84171..ce9c0541a 100644 --- a/tests/domain/bulk_document_download/test_package_plan.py +++ b/tests/domain/bulk_document_download/test_package_plan.py @@ -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"