From e05735bc0faab955f18c26a6ede763abc4ab15a9 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Tue, 9 Feb 2021 00:00:46 +0100 Subject: [PATCH] fix some test cases --- src/documents/tests/test_api.py | 1 + src/documents/tests/test_file_handling.py | 1 + src/documents/tests/test_management.py | 1 + 3 files changed, 3 insertions(+) diff --git a/src/documents/tests/test_api.py b/src/documents/tests/test_api.py index 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.py index 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.py index 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)