mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 17:17:26 +01:00
classifier caching
This commit is contained in:
parent
0024c2aae4
commit
ffe96c8fff
4 changed files with 68 additions and 76 deletions
|
|
@ -2,7 +2,7 @@ import os
|
|||
from unittest import mock
|
||||
|
||||
from django.conf import settings
|
||||
from django.test import TestCase
|
||||
from django.test import TestCase, override_settings
|
||||
from django.utils import timezone
|
||||
|
||||
from documents import tasks
|
||||
|
|
@ -52,6 +52,7 @@ class TestTasks(DirectoriesMixin, TestCase):
|
|||
load_classifier.assert_called_once()
|
||||
self.assertFalse(os.path.isfile(settings.MODEL_FILE))
|
||||
|
||||
@override_settings(CACHES={'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}})
|
||||
def test_train_classifier(self):
|
||||
c = Correspondent.objects.create(matching_algorithm=Tag.MATCH_AUTO, name="test")
|
||||
doc = Document.objects.create(correspondent=c, content="test", title="test")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue