From 05f59e7d5e982c3d5f7facde4f7d68637a3f3e84 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Tue, 9 Feb 2021 02:13:25 +0100 Subject: [PATCH] another way to make the test case fail --- src/documents/tests/test_consumer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/documents/tests/test_consumer.py b/src/documents/tests/test_consumer.py index 280124f48..b96e4844b 100644 --- a/src/documents/tests/test_consumer.py +++ b/src/documents/tests/test_consumer.py @@ -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()