diff options
author | Erik Johnston <erik@matrix.org> | 2014-11-26 12:06:36 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-11-26 12:06:36 +0000 |
commit | 48ee9ddb22b36f1adc23290e76287a922488596d (patch) | |
tree | d9eccedd90f9c573634c5456cfbbb65684214c6e /tests/handlers/test_federation.py | |
parent | Use tagged version of matrix-angular-sdk (diff) | |
parent | Bump version numbers and change log (diff) | |
download | synapse-48ee9ddb22b36f1adc23290e76287a922488596d.tar.xz |
Merge branch 'release-v0.5.1' of github.com:matrix-org/synapse v0.5.1
Diffstat (limited to 'tests/handlers/test_federation.py')
-rw-r--r-- | tests/handlers/test_federation.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/handlers/test_federation.py b/tests/handlers/test_federation.py index 3487a090e9..98cfbe50b3 100644 --- a/tests/handlers/test_federation.py +++ b/tests/handlers/test_federation.py @@ -83,20 +83,22 @@ class FederationTestCase(unittest.TestCase): event_id="$a:b", user_id="@a:b", origin="b", + auth_events=[], hashes={"sha256":"AcLrgtUIqqwaGoHhrEvYG1YLDIsVPYJdSRGhkp3jJp8"}, ) self.datastore.persist_event.return_value = defer.succeed(None) self.datastore.get_room.return_value = defer.succeed(True) - self.state_handler.annotate_event_with_state.return_value = ( - defer.succeed(False) - ) + def annotate(ev, old_state=None): + ev.old_state_events = [] + return defer.succeed(False) + self.state_handler.annotate_event_with_state.side_effect = annotate yield self.handlers.federation_handler.on_receive_pdu(pdu, False) self.datastore.persist_event.assert_called_once_with( - ANY, False, is_new_state=False + ANY, is_new_state=False, backfilled=False, current_state=None ) self.state_handler.annotate_event_with_state.assert_called_once_with( @@ -104,7 +106,7 @@ class FederationTestCase(unittest.TestCase): old_state=None, ) - self.auth.check.assert_called_once_with(ANY, raises=True) + self.auth.check.assert_called_once_with(ANY, auth_events={}) self.notifier.on_new_room_event.assert_called_once_with( ANY, |