mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-10 00:18:57 +00:00
Runs the pre-commit hooks over all the Python files
This commit is contained in:
@@ -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")
|
||||
|
Reference in New Issue
Block a user