Merge branch 'main' into opengraph-image-generation

This commit is contained in:
Mouse Reeve
2021-06-17 15:17:54 -07:00
committed by GitHub
86 changed files with 2188 additions and 1834 deletions

View File

@ -58,7 +58,7 @@ class ReadingViews(TestCase):
)
request.user = self.local_user
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
views.start_reading(request, self.book.id)
views.ReadingStatus.as_view()(request, "start", self.book.id)
self.assertEqual(shelf.books.get(), self.book)
@ -88,7 +88,7 @@ class ReadingViews(TestCase):
request = self.factory.post("")
request.user = self.local_user
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
views.start_reading(request, self.book.id)
views.ReadingStatus.as_view()(request, "start", self.book.id)
self.assertFalse(to_read_shelf.books.exists())
self.assertEqual(shelf.books.get(), self.book)
@ -114,7 +114,7 @@ class ReadingViews(TestCase):
request.user = self.local_user
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
views.finish_reading(request, self.book.id)
views.ReadingStatus.as_view()(request, "finish", self.book.id)
self.assertEqual(shelf.books.get(), self.book)