mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-14 18:46:52 +01:00
Format Python code with black
This commit is contained in:
parent
13885968e3
commit
fc695896dd
136 changed files with 6142 additions and 3811 deletions
|
|
@ -7,20 +7,23 @@ from paperless_text.parsers import TextDocumentParser
|
|||
|
||||
|
||||
class TestTextParser(DirectoriesMixin, TestCase):
|
||||
|
||||
def test_thumbnail(self):
|
||||
|
||||
parser = TextDocumentParser(None)
|
||||
|
||||
# just make sure that it does not crash
|
||||
f = parser.get_thumbnail(os.path.join(os.path.dirname(__file__), "samples", "test.txt"), "text/plain")
|
||||
f = parser.get_thumbnail(
|
||||
os.path.join(os.path.dirname(__file__), "samples", "test.txt"), "text/plain"
|
||||
)
|
||||
self.assertTrue(os.path.isfile(f))
|
||||
|
||||
def test_parse(self):
|
||||
|
||||
parser = TextDocumentParser(None)
|
||||
|
||||
parser.parse(os.path.join(os.path.dirname(__file__), "samples", "test.txt"), "text/plain")
|
||||
parser.parse(
|
||||
os.path.join(os.path.dirname(__file__), "samples", "test.txt"), "text/plain"
|
||||
)
|
||||
|
||||
self.assertEqual(parser.get_text(), "This is a test file.\n")
|
||||
self.assertIsNone(parser.get_archive_path())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue