A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
fix some test cases
jonaswinklere05735bc0faa
diff --git a/src/documents/tests/test_api.py b/src/documents/tests/test_api.pyindex 54d2b292d..c4cca8fdc 100644--- a/src/documents/tests/test_api.py+++ b/src/documents/tests/test_api.py@@ -146,6 +146,7 @@ class TestDocumentApi(DirectoriesMixin, APITestCase):self.assertEqual(response.status_code, 200)self.assertEqual(response.content, content_thumbnail)+ @override_settings(PAPERLESS_FILENAME_FORMAT="")def test_download_with_archive(self):_, filename = tempfile.mkstemp(dir=self.dirs.originals_dir)diff --git a/src/documents/tests/test_file_handling.py b/src/documents/tests/test_file_handling.pyindex b24f52aa2..ae25c0f12 100644--- a/src/documents/tests/test_file_handling.py+++ b/src/documents/tests/test_file_handling.py@@ -558,6 +558,7 @@ class TestFileHandlingWithArchive(DirectoriesMixin, TestCase):self.assertTrue(os.path.isfile(doc.source_path))self.assertTrue(os.path.isfile(doc.archive_path))+ @override_settings(PAPERLESS_FILENAME_FORMAT="")def test_archive_deleted(self):original = os.path.join(settings.ORIGINALS_DIR, "0000001.pdf")archive = os.path.join(settings.ARCHIVE_DIR, "0000001.pdf")diff --git a/src/documents/tests/test_management.py b/src/documents/tests/test_management.pyindex a71baa8ba..ac119a431 100644--- a/src/documents/tests/test_management.py+++ b/src/documents/tests/test_management.py@@ -106,6 +106,7 @@ class TestMakeIndex(TestCase):class TestRenamer(DirectoriesMixin, TestCase):+ @override_settings(PAPERLESS_FILENAME_FORMAT="")def test_rename(self):doc = Document.objects.create(title="test", mime_type="application/pdf")doc.filename = generate_filename(doc)