From 1e5a4181913b7a65a3b59bc0a0f0735988850071 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Tue, 9 Feb 2021 00:01:11 +0100 Subject: [PATCH] more testing #511 --- src/documents/tests/samples/simple-noalpha.png | Bin 0 -> 6414 bytes .../tests/test_migration_archive_files.py | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 src/documents/tests/samples/simple-noalpha.png diff --git a/src/documents/tests/samples/simple-noalpha.png b/src/documents/tests/samples/simple-noalpha.png new file mode 100644 index 0000000000000000000000000000000000000000..9a76e76a0b0f7dc86408dcc09b809f3130201f56 GIT binary patch literal 6414 zcmeHs^;^?l*gr53K|%>(gh-3hT~Y!QRGNWwD2*TrgAqew^b|!qJybU!A|fFJ-#=U> z0q^lv1R?N2;ra0CD^wMs)ORqlj@ z(d8s%1V1d*Hc8gjS5YN)CJD(3Velim@ikIXHTkxNN;Gc9|5~bzn${}sY2eE8X|KfQ z^p+K-&f@Cq9}dMw+tXeZbq9TJpC2*M)7x`%Wvy7*6%uiAA%#UbuHT6N8K9!BPI5qe z;|4_!xw<;f|Efi;Vv=*Wu@XyteSNfY;{|>rieBP_e!b^%&*uuqKP(rY1PpWM=4|rz z)c4>4f5=8S2zZ2W#QtlexEtIS8ZgS;MuMHyL%k4YW)YP)Fv)y~hak0^RX<)&uSm@?po^Gi~ z{mX@pb?!xo$)rt*NvV|!=hj431?92$Wl8EkmG?Yaix(P7WzoFRh!#z^i8UmnJ_kSDT^0+K@Y$Y%#uaq>AU3nIvikevUoAg&a>`%R zRtzg?NVckdU7(dCa)Q`WS6{AAr!}j2K^W3imLuG89?ZGR@$6T^+D2)U4~x%yOSr`k zFFC@h02vt>yP~h24wJCOxZ?Q6d7Tdz*Q*(nHowPAJ)HBV*J9UR%QX>G4L`f#e0|1y z@W%;v^uhK}r%OzQo+1Z36AJ)?ZMEJT{eLPbV_oxfQYY&DDvTN8U)A|+$p@U285^n1 z5iV5I6#a_S1bK8)WJN`H*GCHBZ_008zh34%lp8_I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-!K*UIG_UV)af_m2+!t1S&0Z=T1Io_lLV(+xec< z9wj!lDsMDH{Gh&*58`)50FF85C-AqKV|L?nKs%C^ znIha(KBy4{X_IdYnN^B1U@|*Y8r7AlW;IZ{*N2*$o5juV!7ywu0^~4Hx zZC43Dd=VW+qAFIZWdDsADy^2Tr^&{Z!>C%t7m8TrU*BN?L!Car3tM13*x%T}XY29n zUfH+~PKe5$*4IKjve^ubA-;i%?(TY~Op;x@sXlUBqSC&ef``*6cVo2pi!w^7nw)@D zKy2Tp&Y+9ujnWncz6|O3dwG+bRnN~hG@h}n5*U(;lkpEI3Hnb;;eAIkpfz)oijj%9?=Feax09g9v_!8-`JT#Yz@p2YYinZluse_vY23 z_6*g~lww03%YM|PivANZKR&Fr>0kl$EDIL3@La zF6%OQT7q9cb|ml>7ngX%v+GdkTHQ;=g)9GWxE;_K85v2s4B_IU`$QWV`Orq`HW$~M j)8PMG{Qq+yCmbJAiV3Zcx7xrT97I|gI_f2AHX;85-b7+% literal 0 HcmV?d00001 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):