From a2ead137a5a67438692360ac27a9e71fb386e59b Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Mon, 12 Oct 2026 10:20:12 -0700 Subject: [PATCH] Chore: Use shared samples in tests that arrived from dev Co-Authored-By: Claude Sonnet 5.5 --- src/documents/tests/test_management_exporter.py | 5 +---- src/documents/tests/test_tasks.py | 9 +-------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/documents/tests/test_management_exporter.py b/src/documents/tests/test_management_exporter.py index 3e3322fe5..05dc6b081 100644 --- a/src/documents/tests/test_management_exporter.py +++ b/src/documents/tests/test_management_exporter.py @@ -822,10 +822,7 @@ class TestExportImport( def _export_import_barcodes(self, *, split_manifest: bool) -> None: shutil.rmtree(Path(self.dirs.media_dir) / "documents") - shutil.copytree( - Path(__file__).parent / "samples" / "documents", - Path(self.dirs.media_dir) / "documents", - ) + install_document_samples(Path(self.dirs.media_dir) / "documents") DocumentBarcodeFactory(document=self.d1, value="https://example.com") DocumentBarcodeFactory(document=self.d2, page=2, value="DE8937") diff --git a/src/documents/tests/test_tasks.py b/src/documents/tests/test_tasks.py index 7b164d9bd..deeaf72ee 100644 --- a/src/documents/tests/test_tasks.py +++ b/src/documents/tests/test_tasks.py @@ -279,14 +279,7 @@ class TestUpdateContent(DirectoriesMixin, TestCase): def _create_root_with_version(self) -> tuple[Document, Document]: sample1 = self.dirs.scratch_dir / "sample.pdf" - shutil.copy( - Path(__file__).parent - / "samples" - / "documents" - / "originals" - / "0000001.pdf", - sample1, - ) + shutil.copy(SIMPLE_DIGITAL_PDF, sample1) root = DocumentFactory(content="root content", mime_type="application/pdf") version = DocumentFactory( content="my document",