summary refs log tree commit diff
path: root/tests/handlers
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-08-26 19:49:42 +0100
committerMark Haines <mark.haines@matrix.org>2014-08-26 19:49:42 +0100
commitd2798de660c84dea775f3c79ff8200baf084d244 (patch)
tree11501e9446fe13244e2e5e71d0747f32a124e1e1 /tests/handlers
parentUse store.persist_event rather than pdu_actions.persist_outgoing/pdu_actions.... (diff)
downloadsynapse-d2798de660c84dea775f3c79ff8200baf084d244.tar.xz
Fold federation/handler into handlers/federation
Diffstat (limited to 'tests/handlers')
-rw-r--r--tests/handlers/test_room.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/handlers/test_room.py b/tests/handlers/test_room.py
index a1ab8dde68..613f5c307e 100644
--- a/tests/handlers/test_room.py
+++ b/tests/handlers/test_room.py
@@ -53,23 +53,26 @@ class RoomMemberHandlerTestCase(unittest.TestCase):
             handlers=NonCallableMock(spec_set=[
                 "room_member_handler",
                 "profile_handler",
+                "federation_handler",
             ]),
             auth=NonCallableMock(spec_set=["check"]),
-            federation=NonCallableMock(spec_set=[
-                "handle_new_event",
-                "get_state_for_room",
-            ]),
             state_handler=NonCallableMock(spec_set=["handle_new_event"]),
         )
 
+        self.federation = NonCallableMock(spec_set=[
+            "handle_new_event",
+            "get_state_for_room",
+        ])
+
         self.datastore = hs.get_datastore()
         self.handlers = hs.get_handlers()
         self.notifier = hs.get_notifier()
-        self.federation = hs.get_federation()
         self.state_handler = hs.get_state_handler()
         self.distributor = hs.get_distributor()
         self.hs = hs
 
+        self.handlers.federation_handler = self.federation
+
         self.distributor.declare("collect_presencelike_data")
 
         self.handlers.room_member_handler = RoomMemberHandler(self.hs)
@@ -333,21 +336,24 @@ class RoomCreationTest(unittest.TestCase):
             handlers=NonCallableMock(spec_set=[
                 "room_creation_handler",
                 "room_member_handler",
+                "federation_handler",
             ]),
             auth=NonCallableMock(spec_set=["check"]),
-            federation=NonCallableMock(spec_set=[
-                "handle_new_event",
-            ]),
             state_handler=NonCallableMock(spec_set=["handle_new_event"]),
         )
 
+        self.federation = NonCallableMock(spec_set=[
+            "handle_new_event",
+        ])
+
         self.datastore = hs.get_datastore()
         self.handlers = hs.get_handlers()
         self.notifier = hs.get_notifier()
-        self.federation = hs.get_federation()
         self.state_handler = hs.get_state_handler()
         self.hs = hs
 
+        self.handlers.federation_handler = self.federation
+
         self.handlers.room_creation_handler = RoomCreationHandler(self.hs)
         self.room_creation_handler = self.handlers.room_creation_handler