Discard remote boosts

This commit is contained in:
Mouse Reeve
2020-12-18 12:38:27 -08:00
parent 33a8864eb4
commit 0c6049b81c
4 changed files with 35 additions and 21 deletions

View File

@ -410,7 +410,10 @@ class Incoming(TestCase):
'actor': self.remote_user.remote_id,
'object': self.status.to_activity(),
}
incoming.handle_boost(activity)
with patch('bookwyrm.models.status.Status.ignore_activity') \
as discarder:
discarder.return_value = False
incoming.handle_boost(activity)
boost = models.Boost.objects.get()
self.assertEqual(boost.boosted_status, self.status)
notification = models.Notification.objects.get()