Removes unused templatetag

This commit is contained in:
Mouse Reeve 2021-05-11 14:00:23 -07:00
parent 04cc2fb3f3
commit 3de8ae00ae
2 changed files with 0 additions and 19 deletions

View file

@ -43,12 +43,6 @@ def get_user_identifier(user):
return user.localname if user.localname else user.username
@register.filter(name="notification_count")
def get_notification_count(user):
"""how many UNREAD notifications are there"""
return user.notification_set.filter(read=False).count()
@register.filter(name="replies")
def get_replies(status):
"""get all direct replies to a status"""

View file

@ -53,19 +53,6 @@ class TemplateTags(TestCase):
bookwyrm_tags.get_user_identifier(self.remote_user), "rat@example.com"
)
def test_get_notification_count(self, _):
"""just countin'"""
self.assertEqual(bookwyrm_tags.get_notification_count(self.user), 0)
models.Notification.objects.create(user=self.user, notification_type="FAVORITE")
models.Notification.objects.create(user=self.user, notification_type="MENTION")
models.Notification.objects.create(
user=self.remote_user, notification_type="FOLLOW"
)
self.assertEqual(bookwyrm_tags.get_notification_count(self.user), 2)
def test_get_replies(self, _):
"""direct replies to a status"""
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):