mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-03 14:50:31 +00:00
The mail message and mailbox builders, the fake libmagic and the classifier preprocessor stub lived inside test_mail.py and test_classifier.py, so other test modules imported them by importing a test module. They now live in helpers modules beside the tests that use them.
11 lines
227 B
Python
11 lines
227 B
Python
import re
|
|
|
|
|
|
def dummy_preprocess(content: str) -> str:
|
|
"""
|
|
Simpler, faster pre-processing for testing purposes
|
|
"""
|
|
content = content.lower().strip()
|
|
content = re.sub(r"\s+", " ", content)
|
|
return content
|