1
0
Fork 0

Remove nesting in several with..patch calls

This commit is contained in:
Adeodato Simó 2024-03-17 20:36:48 -03:00
parent 1b9e0546e6
commit 4b9fe0af0c
9 changed files with 100 additions and 94 deletions

View file

@ -91,9 +91,11 @@ class Signature(TestCase):
signature = make_signature(
"post", signer or sender, self.rat.inbox, now, digest=digest
)
with patch("bookwyrm.views.inbox.activity_task.apply_async"):
with patch("bookwyrm.models.user.set_remote_server.delay"):
return self.send(signature, now, send_data or data, digest)
with (
patch("bookwyrm.views.inbox.activity_task.apply_async"),
patch("bookwyrm.models.user.set_remote_server.delay"),
):
return self.send(signature, now, send_data or data, digest)
def test_correct_signature(self):
"""this one should just work"""