Runs the pre-commit hooks over all the Python files

This commit is contained in:
Trenton Holmes
2022-03-11 10:55:51 -08:00
parent d3e9799279
commit 1771d18a21
94 changed files with 1638 additions and 991 deletions

View File

@@ -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")