Mock mocks mocks

This commit is contained in:
Mouse Reeve
2021-08-03 16:21:29 -07:00
parent 630ee3b766
commit cbf5747308
12 changed files with 73 additions and 58 deletions

View File

@ -32,7 +32,7 @@ class ActivitypubMixins(TestCase):
"mouse", "mouse@mouse.com", "mouseword", local=True, localname="mouse"
)
self.local_user.remote_id = "http://example.com/a/b"
self.local_user.save(broadcast=False)
self.local_user.save(broadcast=False, update_fields=["remote_id"])
with patch("bookwyrm.models.user.set_remote_server.delay"):
self.remote_user = models.User.objects.create_user(
"rat",
@ -190,7 +190,7 @@ class ActivitypubMixins(TestCase):
def test_get_recipients_combine_inboxes(self, *_):
"""should combine users with the same shared_inbox"""
self.remote_user.shared_inbox = "http://example.com/inbox"
self.remote_user.save(broadcast=False)
self.remote_user.save(broadcast=False, update_fields=["shared_inbox"])
with patch("bookwyrm.models.user.set_remote_server.delay"):
another_remote_user = models.User.objects.create_user(
"nutria",