Remove nesting in several with..patch calls
This commit is contained in:
parent
1b9e0546e6
commit
4b9fe0af0c
9 changed files with 100 additions and 94 deletions
|
@ -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"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue