mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
more testing #511
This commit is contained in:
parent
e05735bc0f
commit
1e5a418191
BIN
src/documents/tests/samples/simple-noalpha.png
Normal file
BIN
src/documents/tests/samples/simple-noalpha.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
@ -112,6 +112,7 @@ class TestMigrateArchiveFiles(DirectoriesMixin, TestMigrations):
|
||||
simple_pdf = os.path.join(os.path.dirname(__file__), "samples", "simple.pdf")
|
||||
simple_pdf2 = os.path.join(os.path.dirname(__file__), "samples", "documents", "originals", "0000002.pdf")
|
||||
simple_txt = os.path.join(os.path.dirname(__file__), "samples", "simple.txt")
|
||||
simple_png = os.path.join(os.path.dirname(__file__), "samples", "simple-noalpha.png")
|
||||
|
||||
Document = apps.get_model("documents", "Document")
|
||||
|
||||
@ -119,8 +120,10 @@ class TestMigrateArchiveFiles(DirectoriesMixin, TestMigrations):
|
||||
self.doc_no_archive = make_test_document(Document, "no_archive", "no_archive.txt", "text/plain", simple_txt)
|
||||
self.clashA = make_test_document(Document, "clash", "clash.pdf", "application/pdf", simple_pdf, simple_pdf)
|
||||
self.clashB = make_test_document(Document, "clash", "clash.jpg", "image/jpeg", simple_jpg, simple_pdf)
|
||||
self.clashC = make_test_document(Document, "clash", "clash.png", "image/png", simple_png, simple_pdf)
|
||||
|
||||
self.assertEqual(archive_path_old(self.clashA), archive_path_old(self.clashB))
|
||||
self.assertEqual(archive_path_old(self.clashA), archive_path_old(self.clashC))
|
||||
self.assertRaises(SanityFailedError, sanity_check)
|
||||
|
||||
def testArchiveFilesMigrated(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user