mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-14 18:46:52 +01:00
Runs the pre-commit hooks over all the Python files
This commit is contained in:
parent
d3e9799279
commit
1771d18a21
94 changed files with 1638 additions and 991 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import os
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from documents.tests.utils import DirectoriesMixin
|
||||
from paperless_text.parsers import TextDocumentParser
|
||||
|
||||
|
|
@ -13,7 +12,8 @@ class TestTextParser(DirectoriesMixin, TestCase):
|
|||
|
||||
# just make sure that it does not crash
|
||||
f = parser.get_thumbnail(
|
||||
os.path.join(os.path.dirname(__file__), "samples", "test.txt"), "text/plain"
|
||||
os.path.join(os.path.dirname(__file__), "samples", "test.txt"),
|
||||
"text/plain",
|
||||
)
|
||||
self.assertTrue(os.path.isfile(f))
|
||||
|
||||
|
|
@ -22,7 +22,8 @@ class TestTextParser(DirectoriesMixin, TestCase):
|
|||
parser = TextDocumentParser(None)
|
||||
|
||||
parser.parse(
|
||||
os.path.join(os.path.dirname(__file__), "samples", "test.txt"), "text/plain"
|
||||
os.path.join(os.path.dirname(__file__), "samples", "test.txt"),
|
||||
"text/plain",
|
||||
)
|
||||
|
||||
self.assertEqual(parser.get_text(), "This is a test file.\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue