forked from mirrors/bookwyrm
A few more failing tests
This commit is contained in:
parent
2653458e56
commit
c56a9021b6
4 changed files with 8 additions and 3 deletions
|
@ -69,6 +69,7 @@ class InboxBlock(TestCase):
|
||||||
self.assertFalse(models.UserFollows.objects.exists())
|
self.assertFalse(models.UserFollows.objects.exists())
|
||||||
self.assertFalse(models.UserFollowRequest.objects.exists())
|
self.assertFalse(models.UserFollowRequest.objects.exists())
|
||||||
|
|
||||||
|
@patch("bookwyrm.activitystreams.remove_user_statuses_task.delay")
|
||||||
def test_handle_unblock(self):
|
def test_handle_unblock(self):
|
||||||
"""unblock a user"""
|
"""unblock a user"""
|
||||||
self.remote_user.blocks.add(self.local_user)
|
self.remote_user.blocks.add(self.local_user)
|
||||||
|
|
|
@ -104,6 +104,7 @@ class BookViews(TestCase):
|
||||||
|
|
||||||
@patch("bookwyrm.suggested_users.rerank_suggestions_task.delay")
|
@patch("bookwyrm.suggested_users.rerank_suggestions_task.delay")
|
||||||
@patch("bookwyrm.activitystreams.populate_stream_task.delay")
|
@patch("bookwyrm.activitystreams.populate_stream_task.delay")
|
||||||
|
@patch("bookwyrm.activitystreams.add_book_statuses_task.delay")
|
||||||
def test_switch_edition(self, *_):
|
def test_switch_edition(self, *_):
|
||||||
"""updates user's relationships to a book"""
|
"""updates user's relationships to a book"""
|
||||||
work = models.Work.objects.create(title="test work")
|
work = models.Work.objects.create(title="test work")
|
||||||
|
|
|
@ -77,7 +77,8 @@ class ReadingViews(TestCase):
|
||||||
self.assertEqual(readthrough.user, self.local_user)
|
self.assertEqual(readthrough.user, self.local_user)
|
||||||
self.assertEqual(readthrough.book, self.book)
|
self.assertEqual(readthrough.book, self.book)
|
||||||
|
|
||||||
def test_start_reading_reshelf(self, *_):
|
@patch("bookwyrm.activitystreams.add_book_statuses_task.delay")
|
||||||
|
def test_start_reading_reshelve(self, *_):
|
||||||
"""begin a book"""
|
"""begin a book"""
|
||||||
to_read_shelf = self.local_user.shelf_set.get(identifier=models.Shelf.TO_READ)
|
to_read_shelf = self.local_user.shelf_set.get(identifier=models.Shelf.TO_READ)
|
||||||
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
|
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
|
||||||
|
|
|
@ -35,7 +35,8 @@ class ReadThrough(TestCase):
|
||||||
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
|
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
|
||||||
self.client.force_login(self.user)
|
self.client.force_login(self.user)
|
||||||
|
|
||||||
def test_create_basic_readthrough(self, delay_mock, _):
|
@patch("bookwyrm.activitystreams.remove_user_statuses_task.delay")
|
||||||
|
def test_create_basic_readthrough(self, delay_mock, *_):
|
||||||
"""A basic readthrough doesn't create a progress update"""
|
"""A basic readthrough doesn't create a progress update"""
|
||||||
self.assertEqual(self.edition.readthrough_set.count(), 0)
|
self.assertEqual(self.edition.readthrough_set.count(), 0)
|
||||||
|
|
||||||
|
@ -56,7 +57,8 @@ class ReadThrough(TestCase):
|
||||||
self.assertEqual(readthroughs[0].finish_date, None)
|
self.assertEqual(readthroughs[0].finish_date, None)
|
||||||
self.assertEqual(delay_mock.call_count, 1)
|
self.assertEqual(delay_mock.call_count, 1)
|
||||||
|
|
||||||
def test_create_progress_readthrough(self, delay_mock, _):
|
@patch("bookwyrm.activitystreams.remove_user_statuses_task.delay")
|
||||||
|
def test_create_progress_readthrough(self, delay_mock, *_):
|
||||||
"""a readthrough with progress"""
|
"""a readthrough with progress"""
|
||||||
self.assertEqual(self.edition.readthrough_set.count(), 0)
|
self.assertEqual(self.edition.readthrough_set.count(), 0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue