Updates inbox tests
This commit is contained in:
@ -14,7 +14,7 @@ class InboxBlock(TestCase):
|
||||
"""basic user and book data"""
|
||||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch(
|
||||
"bookwyrm.activitystreams.populate_stream_task.delay"
|
||||
):
|
||||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"):
|
||||
self.local_user = models.User.objects.create_user(
|
||||
"mouse@example.com",
|
||||
"mouse@mouse.com",
|
||||
@ -57,7 +57,7 @@ class InboxBlock(TestCase):
|
||||
|
||||
with patch(
|
||||
"bookwyrm.activitystreams.remove_user_statuses_task.delay"
|
||||
) as redis_mock:
|
||||
) as redis_mock, patch("bookwyrm.lists_stream.remove_user_lists_task.delay"):
|
||||
views.inbox.activity_task(activity)
|
||||
self.assertTrue(redis_mock.called)
|
||||
views.inbox.activity_task(activity)
|
||||
@ -70,7 +70,9 @@ class InboxBlock(TestCase):
|
||||
self.assertFalse(models.UserFollowRequest.objects.exists())
|
||||
|
||||
@patch("bookwyrm.activitystreams.remove_user_statuses_task.delay")
|
||||
def test_handle_unblock(self, _):
|
||||
@patch("bookwyrm.lists_stream.add_user_lists_task.delay")
|
||||
@patch("bookwyrm.lists_stream.remove_user_lists_task.delay")
|
||||
def test_handle_unblock(self, *_):
|
||||
"""unblock a user"""
|
||||
self.remote_user.blocks.add(self.local_user)
|
||||
|
||||
|
Reference in New Issue
Block a user