Patches broadcasts in list and shelf tests
This commit is contained in:
parent
f42a5444e5
commit
6b07911a01
|
@ -10,6 +10,7 @@ from bookwyrm import models, views
|
||||||
from bookwyrm.activitypub import ActivitypubResponse
|
from bookwyrm.activitypub import ActivitypubResponse
|
||||||
|
|
||||||
|
|
||||||
|
@patch('bookwyrm.broadcast.broadcast_task.delay')
|
||||||
class ListViews(TestCase):
|
class ListViews(TestCase):
|
||||||
''' tag views'''
|
''' tag views'''
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -8,6 +8,7 @@ from bookwyrm import models, views
|
||||||
from bookwyrm.activitypub import ActivitypubResponse
|
from bookwyrm.activitypub import ActivitypubResponse
|
||||||
|
|
||||||
|
|
||||||
|
@patch('bookwyrm.broadcast.broadcast_task.delay')
|
||||||
class ShelfViews(TestCase):
|
class ShelfViews(TestCase):
|
||||||
''' tag views'''
|
''' tag views'''
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -127,8 +128,7 @@ class ShelfViews(TestCase):
|
||||||
'shelf': self.shelf.identifier
|
'shelf': self.shelf.identifier
|
||||||
})
|
})
|
||||||
request.user = self.local_user
|
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
|
# make sure the book is on the shelf
|
||||||
self.assertEqual(self.shelf.books.get(), self.book)
|
self.assertEqual(self.shelf.books.get(), self.book)
|
||||||
|
|
||||||
|
@ -142,8 +142,7 @@ class ShelfViews(TestCase):
|
||||||
})
|
})
|
||||||
request.user = self.local_user
|
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
|
# make sure the book is on the shelf
|
||||||
self.assertEqual(shelf.books.get(), self.book)
|
self.assertEqual(shelf.books.get(), self.book)
|
||||||
|
|
||||||
|
@ -157,8 +156,7 @@ class ShelfViews(TestCase):
|
||||||
})
|
})
|
||||||
request.user = self.local_user
|
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
|
# make sure the book is on the shelf
|
||||||
self.assertEqual(shelf.books.get(), self.book)
|
self.assertEqual(shelf.books.get(), self.book)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue