Fixes mocks in tests
This commit is contained in:
parent
b89cab1ee5
commit
9fdcc7debd
2 changed files with 4 additions and 2 deletions
|
@ -35,6 +35,7 @@ Sender = namedtuple("Sender", ("remote_id", "key_pair"))
|
|||
class Signature(TestCase):
|
||||
"""signature test"""
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
def setUp(self):
|
||||
"""create users and test data"""
|
||||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch(
|
||||
|
@ -86,7 +87,7 @@ class Signature(TestCase):
|
|||
data = json.dumps(get_follow_activity(sender, self.rat))
|
||||
digest = digest or make_digest(data)
|
||||
signature = make_signature(signer or sender, self.rat.inbox, now, digest)
|
||||
with patch("bookwyrm.views.inbox.activity_task.delay"):
|
||||
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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue