Skip to content

Commit

Permalink
Remove FeaturedManager and related obsolete test model code
Browse files Browse the repository at this point in the history
The code under test was removed in 6ae66e0, but some of the test code
remained.
  • Loading branch information
mthuurne committed Mar 22, 2024
1 parent 6e722b5 commit 6c39b58
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,32 +201,6 @@ class NoRendered(models.Model):
body = SplitField(no_excerpt_field=True)


class AuthorMixin:
def by_author(self, name):
return self.filter(author=name)


class PublishedMixin:
def published(self):
return self.filter(published=True)


def unpublished(self):
return self.filter(published=False)


class ByAuthorQuerySet(models.query.QuerySet, AuthorMixin):
pass


class FeaturedManager(models.Manager):
def get_queryset(self):
kwargs = {}
if hasattr(self, "_db"):
kwargs["using"] = self._db
return ByAuthorQuerySet(self.model, **kwargs).filter(feature=True)


class AbstractTracked(models.Model):
number = 1

Expand Down

0 comments on commit 6c39b58

Please sign in to comment.