Fixes remaining test patches

This commit is contained in:
Mouse Reeve
2021-02-08 09:38:28 -08:00
parent 80241e59a7
commit 76e90cb3f6
8 changed files with 68 additions and 25 deletions

View File

@@ -93,7 +93,11 @@ class BookViews(TestCase):
with patch('bookwyrm.models.activitypub_mixin.broadcast_task.delay'):
shelf = models.Shelf.objects.create(
name='Test Shelf', user=self.local_user)
shelf.books.add(edition1)
models.ShelfBook.objects.create(
book=edition1,
user=self.local_user,
shelf=shelf,
)
models.ReadThrough.objects.create(
user=self.local_user, book=edition1)