Fixes mocks syntax

This commit is contained in:
Mouse Reeve
2021-09-06 15:09:04 -07:00
parent 72d5238590
commit 227b72eaf9
8 changed files with 58 additions and 59 deletions

View File

@ -23,7 +23,7 @@ class Shelf(TestCase):
work = models.Work.objects.create(title="Test Work")
self.book = models.Edition.objects.create(title="test book", parent_work=work)
def test_remote_id(self, _):
def test_remote_id(self, *_):
"""shelves use custom remote ids"""
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
shelf = models.Shelf.objects.create(
@ -32,7 +32,7 @@ class Shelf(TestCase):
expected_id = "https://%s/user/mouse/books/test-shelf" % settings.DOMAIN
self.assertEqual(shelf.get_remote_id(), expected_id)
def test_to_activity(self, _):
def test_to_activity(self, *_):
"""jsonify it"""
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
shelf = models.Shelf.objects.create(
@ -46,7 +46,7 @@ class Shelf(TestCase):
self.assertEqual(activity_json["name"], "Test Shelf")
self.assertEqual(activity_json["owner"], self.local_user.remote_id)
def test_create_update_shelf(self, _):
def test_create_update_shelf(self, *_):
"""create and broadcast shelf creation"""
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay") as mock:
@ -67,7 +67,7 @@ class Shelf(TestCase):
self.assertEqual(activity["object"]["name"], "arthur russel")
self.assertEqual(shelf.name, "arthur russel")
def test_shelve(self, _):
def test_shelve(self, *_):
"""create and broadcast shelf creation"""
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
shelf = models.Shelf.objects.create(