mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 08:15:27 +01:00
more testing.
This commit is contained in:
parent
834352130c
commit
384d381acf
1 changed files with 3 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
from django.utils import timezone
|
||||||
|
|
||||||
from documents import tasks
|
from documents import tasks
|
||||||
from documents.models import Document
|
from documents.models import Document
|
||||||
|
|
@ -10,12 +11,12 @@ from documents.tests.utils import DirectoriesMixin
|
||||||
class TestTasks(DirectoriesMixin, TestCase):
|
class TestTasks(DirectoriesMixin, TestCase):
|
||||||
|
|
||||||
def test_index_reindex(self):
|
def test_index_reindex(self):
|
||||||
Document.objects.create(title="test", content="my document", checksum="wow", added=datetime.now(), created=datetime.now(), modified=datetime.now())
|
Document.objects.create(title="test", content="my document", checksum="wow", added=timezone.now(), created=timezone.now(), modified=timezone.now())
|
||||||
|
|
||||||
tasks.index_reindex()
|
tasks.index_reindex()
|
||||||
|
|
||||||
def test_index_optimize(self):
|
def test_index_optimize(self):
|
||||||
Document.objects.create(title="test", content="my document", checksum="wow", added=datetime.now(), created=datetime.now(), modified=datetime.now())
|
Document.objects.create(title="test", content="my document", checksum="wow", added=timezone.now(), created=timezone.now(), modified=timezone.now())
|
||||||
|
|
||||||
tasks.index_optimize()
|
tasks.index_optimize()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue