mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-15 02:57:09 +01:00
improved test cases. Python 3.6 compatibility.
This commit is contained in:
parent
d5ec762954
commit
4bf0d834a0
8 changed files with 116 additions and 61 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import shutil
|
||||
import tempfile
|
||||
from random import randint
|
||||
|
||||
from django.contrib.admin.models import LogEntry
|
||||
|
|
@ -215,6 +217,13 @@ class TestDocumentConsumptionFinishedSignal(TestCase):
|
|||
self.doc_contains = Document.objects.create(
|
||||
content="I contain the keyword.", mime_type="application/pdf")
|
||||
|
||||
self.index_dir = tempfile.mkdtemp()
|
||||
# TODO: we should not need the index here.
|
||||
override_settings(INDEX_DIR=self.index_dir).enable()
|
||||
|
||||
def tearDown(self) -> None:
|
||||
shutil.rmtree(self.index_dir, ignore_errors=True)
|
||||
|
||||
def test_tag_applied_any(self):
|
||||
t1 = Tag.objects.create(
|
||||
name="test", match="keyword", matching_algorithm=Tag.MATCH_ANY)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue