update all test cases to address the archive filename changes

This commit is contained in:
jonaswinkler
2021-02-09 19:51:16 +01:00
parent 69d7f8c180
commit d13e86a892
6 changed files with 64 additions and 25 deletions

View File

@@ -20,6 +20,7 @@ from documents.tests.utils import DirectoriesMixin
sample_file = os.path.join(os.path.dirname(__file__), "samples", "simple.pdf")
@override_settings(PAPERLESS_FILENAME_FORMAT="{correspondent}/{title}")
class TestArchiver(DirectoriesMixin, TestCase):
def make_models(self):
@@ -45,6 +46,7 @@ class TestArchiver(DirectoriesMixin, TestCase):
self.assertTrue(os.path.isfile(doc.archive_path))
self.assertTrue(os.path.isfile(doc.source_path))
self.assertTrue(filecmp.cmp(sample_file, doc.source_path))
self.assertEqual(doc.archive_filename, "none/A.pdf")
class TestDecryptDocuments(TestCase):