Mock mocks mocks

This commit is contained in:
Mouse Reeve
2021-08-03 16:21:29 -07:00
parent 630ee3b766
commit cbf5747308
12 changed files with 73 additions and 58 deletions

View File

@ -7,6 +7,7 @@ from django.utils import timezone
from bookwyrm import models
@patch("bookwyrm.suggested_users.rerank_suggestions_task.delay")
@patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay")
class ReadThrough(TestCase):
"""readthrough tests"""
@ -29,7 +30,7 @@ class ReadThrough(TestCase):
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
self.client.force_login(self.user)
def test_create_basic_readthrough(self, delay_mock):
def test_create_basic_readthrough(self, delay_mock, _):
"""A basic readthrough doesn't create a progress update"""
self.assertEqual(self.edition.readthrough_set.count(), 0)
@ -50,7 +51,7 @@ class ReadThrough(TestCase):
self.assertEqual(readthroughs[0].finish_date, None)
self.assertEqual(delay_mock.call_count, 1)
def test_create_progress_readthrough(self, delay_mock):
def test_create_progress_readthrough(self, delay_mock, _):
"""a readthrough with progress"""
self.assertEqual(self.edition.readthrough_set.count(), 0)