mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 12:01:14 +00:00
Patches broadcasts in list and shelf tests
This commit is contained in:
parent
f42a5444e5
commit
6b07911a01
2 changed files with 5 additions and 6 deletions
|
@ -10,6 +10,7 @@ from bookwyrm import models, views
|
|||
from bookwyrm.activitypub import ActivitypubResponse
|
||||
|
||||
|
||||
@patch('bookwyrm.broadcast.broadcast_task.delay')
|
||||
class ListViews(TestCase):
|
||||
''' tag views'''
|
||||
def setUp(self):
|
||||
|
|
|
@ -8,6 +8,7 @@ from bookwyrm import models, views
|
|||
from bookwyrm.activitypub import ActivitypubResponse
|
||||
|
||||
|
||||
@patch('bookwyrm.broadcast.broadcast_task.delay')
|
||||
class ShelfViews(TestCase):
|
||||
''' tag views'''
|
||||
def setUp(self):
|
||||
|
@ -127,8 +128,7 @@ class ShelfViews(TestCase):
|
|||
'shelf': self.shelf.identifier
|
||||
})
|
||||
request.user = self.local_user
|
||||
with patch('bookwyrm.broadcast.broadcast_task.delay'):
|
||||
views.shelve(request)
|
||||
views.shelve(request)
|
||||
# make sure the book is on the shelf
|
||||
self.assertEqual(self.shelf.books.get(), self.book)
|
||||
|
||||
|
@ -142,8 +142,7 @@ class ShelfViews(TestCase):
|
|||
})
|
||||
request.user = self.local_user
|
||||
|
||||
with patch('bookwyrm.broadcast.broadcast_task.delay'):
|
||||
views.shelve(request)
|
||||
views.shelve(request)
|
||||
# make sure the book is on the shelf
|
||||
self.assertEqual(shelf.books.get(), self.book)
|
||||
|
||||
|
@ -157,8 +156,7 @@ class ShelfViews(TestCase):
|
|||
})
|
||||
request.user = self.local_user
|
||||
|
||||
with patch('bookwyrm.broadcast.broadcast_task.delay'):
|
||||
views.shelve(request)
|
||||
views.shelve(request)
|
||||
# make sure the book is on the shelf
|
||||
self.assertEqual(shelf.books.get(), self.book)
|
||||
|
||||
|
|
Loading…
Reference in a new issue