diff --git a/src/documents/tests/samples/simple-noalpha.png b/src/documents/tests/samples/simple-noalpha.png new file mode 100644 index 000000000..9a76e76a0 Binary files /dev/null and b/src/documents/tests/samples/simple-noalpha.png differ diff --git a/src/documents/tests/test_migration_archive_files.py b/src/documents/tests/test_migration_archive_files.py index 534a5b499..5970a83eb 100644 --- a/src/documents/tests/test_migration_archive_files.py +++ b/src/documents/tests/test_migration_archive_files.py @@ -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):