diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-08-06 13:54:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-06 13:54:23 +0100 |
commit | 1bebc0b78cbedffb6b69fd76327f0eb7663c3c96 (patch) | |
tree | a9e8a88571e71421ed00b1824038eacb3e97e36e /tests/test_federation.py | |
parent | Update the API response for spaces summary over federation. (#10530) (diff) | |
download | synapse-1bebc0b78cbedffb6b69fd76327f0eb7663c3c96.tar.xz |
Clean up federation event auth code (#10539)
* drop old-room hack pretty sure we don't need this any more. * Remove incorrect comment about modifying `context` It doesn't look like the supplied context is ever modified. * Stop `_auth_and_persist_event` modifying its parameters This is only called in three places. Two of them don't pass `auth_events`, and the third doesn't use the dict after passing it in, so this should be non-functional. * Stop `_check_event_auth` modifying its parameters `_check_event_auth` is only called in three places. `on_send_membership_event` doesn't pass an `auth_events`, and `prep` and `_auth_and_persist_event` do not use the map after passing it in. * Stop `_update_auth_events_and_context_for_auth` modifying its parameters Return the updated auth event dict, rather than modifying the parameter. This is only called from `_check_event_auth`. * Improve documentation on `_auth_and_persist_event` Rename `auth_events` parameter to better reflect what it contains. * Improve documentation on `_NewEventInfo` * Improve documentation on `_check_event_auth` rename `auth_events` parameter to better describe what it contains * changelog
Diffstat (limited to '')
-rw-r--r-- | tests/test_federation.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/test_federation.py b/tests/test_federation.py index 0ed8326f55..3785799f46 100644 --- a/tests/test_federation.py +++ b/tests/test_federation.py @@ -75,10 +75,8 @@ class MessageAcceptTests(unittest.HomeserverTestCase): ) self.handler = self.homeserver.get_federation_handler() - self.handler._check_event_auth = ( - lambda origin, event, context, state, auth_events, backfilled: succeed( - context - ) + self.handler._check_event_auth = lambda origin, event, context, state, claimed_auth_event_map, backfilled: succeed( + context ) self.client = self.homeserver.get_federation_client() self.client._check_sigs_and_hash_and_fetch = lambda dest, pdus, **k: succeed( |