diff --git a/tests/managers.py b/tests/managers.py deleted file mode 100644 index 640420cb..00000000 --- a/tests/managers.py +++ /dev/null @@ -1,6 +0,0 @@ -from model_utils.managers import SoftDeletableQuerySet - - -class CustomSoftDeleteQuerySet(SoftDeletableQuerySet): - def only_read(self): - return self.filter(is_read=True) diff --git a/tests/models.py b/tests/models.py index b5b4f37c..442200f2 100644 --- a/tests/models.py +++ b/tests/models.py @@ -14,6 +14,7 @@ JoinManager, QueryManager, SoftDeletableManager, + SoftDeletableQuerySet, ) from model_utils.models import ( SoftDeletableModel, @@ -24,7 +25,6 @@ ) from model_utils.tracker import FieldTracker, ModelTracker from tests.fields import MutableField -from tests.managers import CustomSoftDeleteQuerySet class InheritanceManagerTestRelated(models.Model): @@ -352,6 +352,11 @@ class SoftDeletable(SoftDeletableModel): all_objects: ClassVar[Manager[SoftDeletable]] = models.Manager() +class CustomSoftDeleteQuerySet(SoftDeletableQuerySet): + def only_read(self): + return self.filter(is_read=True) + + class CustomSoftDelete(SoftDeletableModel): is_read = models.BooleanField(default=False)