mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-09-24 02:10:33 +00:00
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:
@@ -28,7 +28,6 @@ from rest_framework.test import APITestCase
|
||||
|
||||
from documents.models import Correspondent
|
||||
from documents.models import MatchingModel
|
||||
from documents.tests.factories import CorrespondentFactory
|
||||
from documents.tests.utils import DirectoriesMixin
|
||||
from documents.tests.utils import FileSystemAssertsMixin
|
||||
from paperless_mail import tasks
|
||||
@@ -43,6 +42,7 @@ from paperless_mail.models import MailRule
|
||||
from paperless_mail.models import ProcessedMail
|
||||
from paperless_mail.tests.factories import MailAccountFactory
|
||||
from paperless_mail.tests.factories import MailRuleFactory
|
||||
from paperless_testing.factories import CorrespondentFactory
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
|
||||
Reference in New Issue
Block a user