diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-22 15:50:23 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-22 15:50:23 +0100 |
commit | e1297c922d7f88eed088b365bd6cf15951443506 (patch) | |
tree | 57fb71ff724a4046d3a8e3ea4ce3de4735b9dd69 /tests/handlers/test_federation.py | |
parent | Added initial swagger REST API spec. (diff) | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.0.1 (diff) | |
download | synapse-e1297c922d7f88eed088b365bd6cf15951443506.tar.xz |
Merge branch 'release-v0.0.1' of github.com:matrix-org/synapse
Diffstat (limited to 'tests/handlers/test_federation.py')
-rw-r--r-- | tests/handlers/test_federation.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/handlers/test_federation.py b/tests/handlers/test_federation.py index ab9c242579..f4cf54b7ee 100644 --- a/tests/handlers/test_federation.py +++ b/tests/handlers/test_federation.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2014 matrix.org # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -41,6 +40,7 @@ class FederationTestCase(unittest.TestCase): datastore=NonCallableMock(spec_set=[ "persist_event", "store_room", + "get_room", ]), resource_for_federation=NonCallableMock(), http_client=NonCallableMock(spec_set=[]), @@ -69,10 +69,11 @@ class FederationTestCase(unittest.TestCase): store_id = "ASD" self.datastore.persist_event.return_value = defer.succeed(store_id) + self.datastore.get_room.return_value = defer.succeed(True) - yield self.handlers.federation_handler.on_receive(event, False) + yield self.handlers.federation_handler.on_receive(event, False, False) - self.datastore.persist_event.assert_called_once_with(event) + self.datastore.persist_event.assert_called_once_with(event, False) self.notifier.on_new_room_event.assert_called_once_with( event, store_id) @@ -89,7 +90,7 @@ class FederationTestCase(unittest.TestCase): content={}, ) - yield self.handlers.federation_handler.on_receive(event, False) + yield self.handlers.federation_handler.on_receive(event, False, False) mem_handler = self.handlers.room_member_handler self.assertEquals(1, mem_handler.change_membership.call_count) @@ -115,7 +116,7 @@ class FederationTestCase(unittest.TestCase): content={}, ) - yield self.handlers.federation_handler.on_receive(event, False) + yield self.handlers.federation_handler.on_receive(event, False, False) mem_handler = self.handlers.room_member_handler self.assertEquals(0, mem_handler.change_membership.call_count) |