Fixes references to populate lists task

This commit is contained in:
Mouse Reeve
2021-12-10 09:34:17 -08:00
parent 94250dab42
commit f7c8a550cf
4 changed files with 7 additions and 5 deletions

View File

@ -7,6 +7,8 @@ from bookwyrm.management.commands.populate_lists_streams import populate_lists_s
@patch("bookwyrm.models.activitypub_mixin.broadcast_task.apply_async")
@patch("bookwyrm.activitystreams.add_status_task.delay")
@patch("bookwyrm.activitystreams.populate_stream_task.delay")
class Activitystreams(TestCase):
"""using redis to build activity streams"""
@ -45,10 +47,10 @@ class Activitystreams(TestCase):
)
self.book = models.Edition.objects.create(title="test book")
def test_populate_streams(self, _):
def test_populate_streams(self, *_):
"""make sure the function on the redis manager gets called"""
with patch(
"bookwyrm.lists_stream.populate_lists_stream_task.delay"
"bookwyrm.lists_stream.populate_lists_task.delay"
) as list_mock:
populate_lists_streams()
self.assertEqual(list_mock.call_count, 2) # 2 users

View File

@ -55,7 +55,7 @@ class Activitystreams(TestCase):
with patch(
"bookwyrm.activitystreams.populate_stream_task.delay"
) as redis_mock, patch(
"bookwyrm.lists_stream.populate_lists_stream_task.delay"
"bookwyrm.lists_stream.populate_lists_task.delay"
) as list_mock:
populate_streams()
self.assertEqual(redis_mock.call_count, 6) # 2 users x 3 streams