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
2026-09-21 10:57:11 -07:00
committed by GitHub
parent 659a0cb2ef
commit 48d97b78bb
34 changed files with 71 additions and 71 deletions
+2 -2
View File
@@ -48,11 +48,11 @@ from documents.models import Workflow
from documents.models import WorkflowAction
from documents.models import WorkflowTrigger
from documents.signals.handlers import run_workflows
from documents.tests.factories import DocumentFactory
from documents.tests.factories import TagFactory
from documents.tests.utils import ConsumeTaskMixin
from documents.tests.utils import DirectoriesMixin
from documents.tests.utils import read_streaming_response
from paperless_testing.factories import DocumentFactory
from paperless_testing.factories import TagFactory
class TestDocumentApi(DirectoriesMixin, ConsumeTaskMixin, APITestCase):