Fixes mocks syntax
This commit is contained in:
@ -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(
|
||||
|
Reference in New Issue
Block a user