summary refs log tree commit diff
path: root/tests/test_federation.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-09-08 19:03:08 +0100
committerGitHub <noreply@github.com>2021-09-08 19:03:08 +0100
commitabedf7d77ff23716e9af4a19f00219bb53d40862 (patch)
tree6f829fd51a4b0091e5e02a1114008e3a588308b6 /tests/test_federation.py
parentImprove the modules doc (#10758) (diff)
downloadsynapse-abedf7d77ff23716e9af4a19f00219bb53d40862.tar.xz
Get rid of `_auth_and_persist_event` (#10781)
This is only called in two places, and the code seems much clearer without it.
Diffstat (limited to 'tests/test_federation.py')
-rw-r--r--tests/test_federation.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/test_federation.py b/tests/test_federation.py
index 61c9d7c2ef..c51e018da1 100644
--- a/tests/test_federation.py
+++ b/tests/test_federation.py
@@ -76,9 +76,18 @@ class MessageAcceptTests(unittest.HomeserverTestCase):
 
         self.handler = self.homeserver.get_federation_handler()
         federation_event_handler = self.homeserver.get_federation_event_handler()
-        federation_event_handler._check_event_auth = lambda origin, event, context, state, claimed_auth_event_map, backfilled: succeed(
-            context
-        )
+
+        async def _check_event_auth(
+            origin,
+            event,
+            context,
+            state=None,
+            claimed_auth_event_map=None,
+            backfilled=False,
+        ):
+            return context
+
+        federation_event_handler._check_event_auth = _check_event_auth
         self.client = self.homeserver.get_federation_client()
         self.client._check_sigs_and_hash_and_fetch = lambda dest, pdus, **k: succeed(
             pdus