mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
more test
This commit is contained in:
parent
282e6f453f
commit
5e1543bad5
@ -5,7 +5,7 @@ from pathlib import Path
|
|||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
from documents.models import Document
|
from documents.models import Document
|
||||||
from documents.sanity_checker import check_sanity
|
from documents.sanity_checker import check_sanity, SanityFailedError
|
||||||
from documents.tests.utils import DirectoriesMixin
|
from documents.tests.utils import DirectoriesMixin
|
||||||
|
|
||||||
|
|
||||||
@ -81,3 +81,7 @@ class TestSanityCheck(DirectoriesMixin, TestCase):
|
|||||||
doc = self.make_test_data()
|
doc = self.make_test_data()
|
||||||
Path(self.dirs.originals_dir, "orphaned").touch()
|
Path(self.dirs.originals_dir, "orphaned").touch()
|
||||||
self.assertEqual(len(check_sanity()), 1)
|
self.assertEqual(len(check_sanity()), 1)
|
||||||
|
|
||||||
|
def test_all(self):
|
||||||
|
Document.objects.create(title="test", checksum="dgfhj", archive_checksum="dfhg", content="", pk=1, filename="0000001.pdf")
|
||||||
|
string = str(SanityFailedError(check_sanity()))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user