mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-12 01:26:47 +01:00
more testing.
This commit is contained in:
parent
b97fa9e3b9
commit
e431a658cc
4 changed files with 28 additions and 3 deletions
23
src/documents/tests/test_tasks.py
Normal file
23
src/documents/tests/test_tasks.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
from datetime import datetime
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from documents import tasks
|
||||
from documents.models import Document
|
||||
from documents.tests.utils import DirectoriesMixin
|
||||
|
||||
|
||||
class TestTasks(DirectoriesMixin, TestCase):
|
||||
|
||||
def test_index_reindex(self):
|
||||
Document.objects.create(title="test", content="my document", checksum="wow", added=datetime.now(), created=datetime.now(), modified=datetime.now())
|
||||
|
||||
tasks.index_reindex()
|
||||
|
||||
def test_index_optimize(self):
|
||||
Document.objects.create(title="test", content="my document", checksum="wow", added=datetime.now(), created=datetime.now(), modified=datetime.now())
|
||||
|
||||
tasks.index_optimize()
|
||||
|
||||
def test_train_classifier(self):
|
||||
tasks.train_classifier()
|
||||
Loading…
Add table
Add a link
Reference in a new issue