A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
add more tests
Florian Brandese214f719c955
diff --git a/src/documents/tests/samples/barcodes/patch-code-t-middle_reverse.pdf b/src/documents/tests/samples/barcodes/patch-code-t-middle_reverse.pdfnew file mode 100644index 000000000..e1f8bc39cBinary files /dev/null and b/src/documents/tests/samples/barcodes/patch-code-t-middle_reverse.pdf differdiff --git a/src/documents/tests/samples/barcodes/several-patcht-codes.pdf b/src/documents/tests/samples/barcodes/several-patcht-codes.pdfnew file mode 100644index 000000000..de4c715c8Binary files /dev/null and b/src/documents/tests/samples/barcodes/several-patcht-codes.pdf differdiff --git a/src/documents/tests/test_tasks.py b/src/documents/tests/test_tasks.pyindex 46be59d53..8160dd3f3 100644--- a/src/documents/tests/test_tasks.py+++ b/src/documents/tests/test_tasks.py@@ -229,6 +229,26 @@ class TestTasks(DirectoriesMixin, TestCase):pages = tasks.scan_file_for_separating_barcodes(test_file)self.assertEqual(pages, [1])+ def test_scan_file_for_separating_barcodes4(self):+ test_file = os.path.join(+ os.path.dirname(__file__),+ "samples",+ "barcodes",+ "several-patcht-codes.pdf",+ )+ pages = tasks.scan_file_for_separating_barcodes(test_file)+ self.assertEqual(pages, [2, 5])++ def test_scan_file_for_separating_barcodes_upsidedown(self):+ test_file = os.path.join(+ os.path.dirname(__file__),+ "samples",+ "barcodes",+ "patch-code-t-middle_reverse.pdf",+ )+ pages = tasks.scan_file_for_separating_barcodes(test_file)+ self.assertEqual(pages, [1])+def test_scan_file_for_separating_qr_barcodes(self):test_file = os.path.join(os.path.dirname(__file__),