Chore: Move model factories to the shared test layer (#14170)

The model factories lived in the documents test package, but three other
apps needed them. The AI, mail and testing suites all reached across an app
boundary to import from documents.tests.factories, which made a private test
package into a shared dependency.

The factories now live in the shared testing package, where cross-app use is
the intended use.
This commit is contained in:
Trenton H authored and GitHub committed 2026-09-21 10:57:11 -07:00
1 parent 659a0cb2ef
commit 48d97b78bb
34 files changed
+71 -71

No files matched your search

+1 -1
View File
@@ -14,7 +14,6 @@ from llama_index.core.embeddings.mock_embed_model import MockEmbedding
from llama_index.core.schema import TextNode
from documents.models import Document
from documents.tests.factories import DocumentFactory
from paperless_ai import chat
from paperless_ai import indexing
from paperless_ai.chat import CHAT_ERROR_MESSAGE
@@ -22,6 +21,7 @@ from paperless_ai.chat import CHAT_METADATA_DELIMITER
from paperless_ai.chat import _build_chat_prompt
from paperless_ai.chat import _build_refine_prompt
from paperless_ai.chat import stream_chat_with_documents
from paperless_testing.factories import DocumentFactory
if TYPE_CHECKING:
from pathlib import Path