remove followers group visibility test

Also updates description of group.followers_filter() override
This commit is contained in:
Hugh Rundle 2021-10-22 18:42:18 +11:00
parent 19c7e43f50
commit bd20c9ce2c
2 changed files with 1 additions and 10 deletions

View file

@ -23,7 +23,7 @@ class Group(BookWyrmModel):
@classmethod
def followers_filter(cls, queryset, viewer):
"""Override filter for "followers" privacy level to allow non-following
group members to see the existence of groups and group lists"""
group members to see the existence of group-curated lists"""
return queryset.exclude(
~Q( # user is not a group member

View file

@ -75,15 +75,6 @@ class Group(TestCase):
)
models.GroupMember.objects.create(group=self.public_group, user=self.capybara)
def test_group_members_can_see_followers_only_groups(self, _):
"""follower-only group should not be excluded from group listings for group members viewing"""
rat_groups = models.Group.privacy_filter(self.rat).all()
badger_groups = models.Group.privacy_filter(self.badger).all()
self.assertFalse(self.followers_only_group in rat_groups)
self.assertTrue(self.followers_only_group in badger_groups)
def test_group_members_can_see_private_groups(self, _):
"""direct privacy group should not be excluded from group listings for group members viewing"""