diff --git a/bookwyrm/tests/activitystreams/test_signals.py b/bookwyrm/tests/activitystreams/test_signals.py index c5c7e6985..4db1875f9 100644 --- a/bookwyrm/tests/activitystreams/test_signals.py +++ b/bookwyrm/tests/activitystreams/test_signals.py @@ -62,11 +62,11 @@ class ActivitystreamsSignals(TestCase): self.assertEqual(args["args"][0], status.id) self.assertEqual(args["queue"], "high_priority") - def test_populate_streams_on_account_create(self, *_): + def test_populate_streams_on_account_create_command(self, *_): """create streams for a user""" with patch("bookwyrm.activitystreams.populate_stream_task.delay") as mock: - activitystreams.populate_streams_on_account_create( - models.User, self.local_user, True + activitystreams.populate_streams_on_account_create_command( + self.local_user.id ) self.assertEqual(mock.call_count, 3) args = mock.call_args[0] diff --git a/bookwyrm/tests/lists_stream/test_signals.py b/bookwyrm/tests/lists_stream/test_signals.py index 2b48ef9ba..42e60327c 100644 --- a/bookwyrm/tests/lists_stream/test_signals.py +++ b/bookwyrm/tests/lists_stream/test_signals.py @@ -36,7 +36,7 @@ class ListsStreamSignals(TestCase): user=self.remote_user, name="hi", privacy="public" ) with patch("bookwyrm.lists_stream.add_list_task.delay") as mock: - lists_stream.add_list_on_create_command(book_list) + lists_stream.add_list_on_create_command(book_list.id) self.assertEqual(mock.call_count, 1) args = mock.call_args[0] self.assertEqual(args[0], book_list.id) @@ -51,12 +51,10 @@ class ListsStreamSignals(TestCase): args = mock.call_args[0] self.assertEqual(args[0], book_list.id) - def test_populate_lists_on_account_create(self, _): + def test_populate_lists_on_account_create_command(self, _): """create streams for a user""" with patch("bookwyrm.lists_stream.populate_lists_task.delay") as mock: - lists_stream.populate_lists_on_account_create( - models.User, self.local_user, True - ) + lists_stream.populate_lists_on_account_create_command(self.local_user.id) self.assertEqual(mock.call_count, 1) args = mock.call_args[0] self.assertEqual(args[0], self.local_user.id) diff --git a/bookwyrm/tests/lists_stream/test_tasks.py b/bookwyrm/tests/lists_stream/test_tasks.py index 4c673a3a5..c99ed665b 100644 --- a/bookwyrm/tests/lists_stream/test_tasks.py +++ b/bookwyrm/tests/lists_stream/test_tasks.py @@ -42,13 +42,13 @@ class Activitystreams(TestCase): def test_populate_lists_task(self, *_): """populate lists cache""" - with patch("bookwyrm.lists_stream.ListsStream.populate_streams") as mock: + with patch("bookwyrm.lists_stream.ListsStream.populate_lists") as mock: lists_stream.populate_lists_task(self.local_user.id) self.assertTrue(mock.called) args = mock.call_args[0] self.assertEqual(args[0], self.local_user) - with patch("bookwyrm.lists_stream.ListsStream.populate_streams") as mock: + with patch("bookwyrm.lists_stream.ListsStream.populate_lists") as mock: lists_stream.populate_lists_task(self.local_user.id) self.assertTrue(mock.called) args = mock.call_args[0] diff --git a/bookwyrm/tests/test_suggested_users.py b/bookwyrm/tests/test_suggested_users.py index 91677f199..77b82e7ee 100644 --- a/bookwyrm/tests/test_suggested_users.py +++ b/bookwyrm/tests/test_suggested_users.py @@ -236,12 +236,3 @@ class SuggestedUsers(TestCase): ) user_1_annotated = result.get(id=user_1.id) self.assertEqual(user_1_annotated.mutuals, 3) - - def test_create_user_signal(self, *_): - """build suggestions for new users""" - with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay") as mock: - models.User.objects.create_user( - "nutria", "nutria@nu.tria", "password", local=True, localname="nutria" - ) - - self.assertEqual(mock.call_count, 1)