mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-12 21:44:21 -06:00
Fix embedding imports
This commit is contained in:
@@ -3,8 +3,8 @@ from unittest.mock import MagicMock
|
|||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
import paperless_ai.embedding as embedding
|
|
||||||
from documents.models import Document
|
from documents.models import Document
|
||||||
from paperless.models import LLMEmbeddingBackend
|
from paperless.models import LLMEmbeddingBackend
|
||||||
from paperless_ai.embedding import build_llm_index_text
|
from paperless_ai.embedding import build_llm_index_text
|
||||||
@@ -20,10 +20,10 @@ def mock_ai_config():
|
|||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def temp_llm_index_dir(tmp_path):
|
def temp_llm_index_dir(tmp_path):
|
||||||
original_dir = embedding.settings.LLM_INDEX_DIR
|
original_dir = settings.LLM_INDEX_DIR
|
||||||
embedding.settings.LLM_INDEX_DIR = tmp_path
|
settings.LLM_INDEX_DIR = tmp_path
|
||||||
yield tmp_path
|
yield tmp_path
|
||||||
embedding.settings.LLM_INDEX_DIR = original_dir
|
settings.LLM_INDEX_DIR = original_dir
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|||||||
Reference in New Issue
Block a user