mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-30 18:27:45 -05:00
also apply \0 removal to sidecar contents
This commit is contained in:
@@ -7,7 +7,7 @@ from django.test import TestCase, override_settings
|
||||
|
||||
from documents.parsers import ParseError, run_convert
|
||||
from documents.tests.utils import DirectoriesMixin
|
||||
from paperless_tesseract.parsers import RasterisedDocumentParser, strip_excess_whitespace
|
||||
from paperless_tesseract.parsers import RasterisedDocumentParser, post_process_text
|
||||
|
||||
image_to_string_calls = []
|
||||
|
||||
@@ -32,8 +32,6 @@ class FakeImageFile(ContextManager):
|
||||
return os.path.basename(self.fname)
|
||||
|
||||
|
||||
|
||||
|
||||
class TestParser(DirectoriesMixin, TestCase):
|
||||
|
||||
def assertContainsStrings(self, content, strings):
|
||||
@@ -58,9 +56,9 @@ class TestParser(DirectoriesMixin, TestCase):
|
||||
)
|
||||
]
|
||||
|
||||
def test_strip_excess_whitespace(self):
|
||||
def test_post_process_text(self):
|
||||
for source, result in self.text_cases:
|
||||
actual_result = strip_excess_whitespace(source)
|
||||
actual_result = post_process_text(source)
|
||||
self.assertEqual(
|
||||
result,
|
||||
actual_result,
|
||||
|
Reference in New Issue
Block a user