mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-30 20:10:36 +00:00
Fixes call to add_status signal
This commit is contained in:
parent
e6a251fdad
commit
cad5a128ac
1 changed files with 4 additions and 3 deletions
|
@ -53,11 +53,12 @@ class ActivitystreamsSignals(TestCase):
|
||||||
status = models.Status.objects.create(
|
status = models.Status.objects.create(
|
||||||
user=self.remote_user, content="hi", privacy="public"
|
user=self.remote_user, content="hi", privacy="public"
|
||||||
)
|
)
|
||||||
with patch("bookwyrm.activitystreams.add_status_task.delay") as mock:
|
with patch("bookwyrm.activitystreams.add_status_task.apply_async") as mock:
|
||||||
activitystreams.add_status_on_create_command(models.Status, status, False)
|
activitystreams.add_status_on_create_command(models.Status, status, False)
|
||||||
self.assertEqual(mock.call_count, 1)
|
self.assertEqual(mock.call_count, 1)
|
||||||
args = mock.call_args[0]
|
args = mock.call_args[1]
|
||||||
self.assertEqual(args[0], status.id)
|
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(self, _):
|
||||||
"""create streams for a user"""
|
"""create streams for a user"""
|
||||||
|
|
Loading…
Reference in a new issue