From d3162e12db9d4f9ae975253f5fe10e21747f6c0a Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 8 Mar 2021 08:51:54 -0800 Subject: [PATCH] Adds broadcast mock to edit book tests --- bookwyrm/tests/views/test_book.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bookwyrm/tests/views/test_book.py b/bookwyrm/tests/views/test_book.py index 6a28ba9d..484c695b 100644 --- a/bookwyrm/tests/views/test_book.py +++ b/bookwyrm/tests/views/test_book.py @@ -112,7 +112,8 @@ class BookViews(TestCase): request = self.factory.post('', form.data) request.user = self.local_user - view(request, self.book.id) + with patch('bookwyrm.models.activitypub_mixin.broadcast_task.delay'): + view(request, self.book.id) self.book.refresh_from_db() self.assertEqual(self.book.title, 'New Title') @@ -132,7 +133,8 @@ class BookViews(TestCase): request = self.factory.post('', form.data) request.user = self.local_user - view(request, self.book.id) + with patch('bookwyrm.models.activitypub_mixin.broadcast_task.delay'): + view(request, self.book.id) self.book.refresh_from_db() self.assertEqual(self.book.title, 'New Title') self.assertFalse(self.book.authors.exists())