Adds mock to fields

This commit is contained in:
Mouse Reeve 2021-08-03 12:27:42 -07:00
parent ebc0680288
commit ee9c5a2a4b
2 changed files with 11 additions and 9 deletions

View file

@ -186,6 +186,7 @@ class ActivitypubFields(TestCase):
@patch("bookwyrm.models.activitypub_mixin.ObjectMixin.broadcast")
@patch("bookwyrm.activitystreams.ActivityStream.add_status")
@patch("bookwyrm.suggested_users.rerank_suggestions_task.delay")
def test_privacy_field_set_activity_from_field(self, *_):
"""translate between to/cc fields and privacy"""
user = User.objects.create_user(

View file

@ -21,6 +21,7 @@ class ViewsHelpers(TestCase):
"""we need basic test data and mocks"""
self.factory = RequestFactory()
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"):
with patch("bookwyrm.suggested_users.rerank_user_task.delay"):
self.local_user = models.User.objects.create_user(
"mouse@local.com",
"mouse@mouse.com",