forked from mirrors/bookwyrm
Adds broadcast mock to edit book tests
This commit is contained in:
parent
6d9c024e0e
commit
d3162e12db
1 changed files with 4 additions and 2 deletions
|
@ -112,6 +112,7 @@ class BookViews(TestCase):
|
||||||
request = self.factory.post('', form.data)
|
request = self.factory.post('', form.data)
|
||||||
request.user = self.local_user
|
request.user = self.local_user
|
||||||
|
|
||||||
|
with patch('bookwyrm.models.activitypub_mixin.broadcast_task.delay'):
|
||||||
view(request, self.book.id)
|
view(request, self.book.id)
|
||||||
|
|
||||||
self.book.refresh_from_db()
|
self.book.refresh_from_db()
|
||||||
|
@ -132,6 +133,7 @@ class BookViews(TestCase):
|
||||||
request = self.factory.post('', form.data)
|
request = self.factory.post('', form.data)
|
||||||
request.user = self.local_user
|
request.user = self.local_user
|
||||||
|
|
||||||
|
with patch('bookwyrm.models.activitypub_mixin.broadcast_task.delay'):
|
||||||
view(request, self.book.id)
|
view(request, self.book.id)
|
||||||
self.book.refresh_from_db()
|
self.book.refresh_from_db()
|
||||||
self.assertEqual(self.book.title, 'New Title')
|
self.assertEqual(self.book.title, 'New Title')
|
||||||
|
|
Loading…
Reference in a new issue