From 2a6339cf21ff77b6278487c453a52e96ca2b9280 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 17 Jun 2021 13:10:01 -0700 Subject: [PATCH] Fixes redis interaction mock --- bookwyrm/tests/views/test_interaction.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bookwyrm/tests/views/test_interaction.py b/bookwyrm/tests/views/test_interaction.py index cb5e97cb..3867f57d 100644 --- a/bookwyrm/tests/views/test_interaction.py +++ b/bookwyrm/tests/views/test_interaction.py @@ -162,13 +162,17 @@ class InteractionViews(TestCase): view(request, status.id) self.assertEqual(models.Boost.objects.count(), 1) + @patch("bookwyrm.activitystreams.ActivityStream.add_status") def test_unboost(self, *_): """undo a boost""" view = views.Unboost.as_view() request = self.factory.post("") request.user = self.remote_user - with patch("bookwyrm.activitystreams.ActivityStream.add_status"): - status = models.Status.objects.create(user=self.local_user, content="hi") + status = models.Status.objects.create(user=self.local_user, content="hi") + + with patch( + "bookwyrm.activitystreams.ActivityStream.remove_object_from_related_stores" + ): views.Boost.as_view()(request, status.id) self.assertEqual(models.Boost.objects.count(), 1)