mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 03:51:08 +00:00
fixes book mock in user view tests
This commit is contained in:
parent
70a535adb7
commit
d390b395e6
2 changed files with 6 additions and 2 deletions
|
@ -34,7 +34,9 @@ class EditUserViews(TestCase):
|
||||||
"rat@local.com", "rat@rat.rat", "password", local=True, localname="rat"
|
"rat@local.com", "rat@rat.rat", "password", local=True, localname="rat"
|
||||||
)
|
)
|
||||||
|
|
||||||
self.book = models.Edition.objects.create(title="test")
|
self.book = models.Edition.objects.create(
|
||||||
|
title="test", parent_work=models.Work.objects.create(title="test work")
|
||||||
|
)
|
||||||
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
|
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
|
||||||
models.ShelfBook.objects.create(
|
models.ShelfBook.objects.create(
|
||||||
book=self.book,
|
book=self.book,
|
||||||
|
|
|
@ -28,7 +28,9 @@ class UserViews(TestCase):
|
||||||
self.rat = models.User.objects.create_user(
|
self.rat = models.User.objects.create_user(
|
||||||
"rat@local.com", "rat@rat.rat", "password", local=True, localname="rat"
|
"rat@local.com", "rat@rat.rat", "password", local=True, localname="rat"
|
||||||
)
|
)
|
||||||
self.book = models.Edition.objects.create(title="test")
|
self.book = models.Edition.objects.create(
|
||||||
|
title="test", parent_work=models.Work.objects.create(title="test work")
|
||||||
|
)
|
||||||
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
|
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
|
||||||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"):
|
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"):
|
||||||
models.ShelfBook.objects.create(
|
models.ShelfBook.objects.create(
|
||||||
|
|
Loading…
Reference in a new issue