]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
another way to make the test case fail
authorjonaswinkler <jonas.winkler@jpwinkler.de>
Tue, 9 Feb 2021 01:13:25 +0000 (02:13 +0100)
committerjonaswinkler <jonas.winkler@jpwinkler.de>
Tue, 9 Feb 2021 01:13:25 +0000 (02:13 +0100)
src/documents/tests/test_consumer.py

index 280124f48efbac1b19e17a77663173c1c8a1fc28..b96e4844b23cb07520cc6e923b2b5ed308a22c24 100644 (file)
@@ -543,13 +543,15 @@ class TestConsumer(DirectoriesMixin, TestCase):
     def test_similar_filenames(self, m):
         shutil.copy(os.path.join(os.path.dirname(__file__), "samples", "simple.pdf"), os.path.join(settings.CONSUMPTION_DIR, "simple.pdf"))
         shutil.copy(os.path.join(os.path.dirname(__file__), "samples", "simple.png"), os.path.join(settings.CONSUMPTION_DIR, "simple.png"))
+        shutil.copy(os.path.join(os.path.dirname(__file__), "samples", "simple-noalpha.png"), os.path.join(settings.CONSUMPTION_DIR, "simple.png.pdf"))
         m.return_value = [(None, {
             "parser": CopyParser,
-            "mime_types": {"application/pdf": ".pdf", "image/png": ".zip"},
+            "mime_types": {"application/pdf": ".pdf", "image/png": ".png"},
             "weight": 0
         })]
         doc1 = self.consumer.try_consume_file(os.path.join(settings.CONSUMPTION_DIR, "simple.png"))
         doc2 = self.consumer.try_consume_file(os.path.join(settings.CONSUMPTION_DIR, "simple.pdf"))
+        doc3 = self.consumer.try_consume_file(os.path.join(settings.CONSUMPTION_DIR, "simple.png.pdf"))
 
         sanity_check()