summary refs log tree commit diff
path: root/tests/test_federation.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-06-27 11:31:48 +0100
committerAmber Brown <hawkowl@atleastfornow.net>2018-06-27 11:31:48 +0100
commit8d62baa48cb222c3010007fdd6e48673f5cd0519 (patch)
treeb69ab7108c56ae61256eb91c3d15d8b361f6c4ec /tests/test_federation.py
parenthandle federation not telling us about prev_events (diff)
downloadsynapse-8d62baa48cb222c3010007fdd6e48673f5cd0519.tar.xz
cleanups
Diffstat (limited to 'tests/test_federation.py')
-rw-r--r--tests/test_federation.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/test_federation.py b/tests/test_federation.py
index 12f4633cd5..bc8b3af9b3 100644
--- a/tests/test_federation.py
+++ b/tests/test_federation.py
@@ -35,7 +35,7 @@ class MessageAcceptTests(unittest.TestCase):
 
         # Figure out what the most recent event is
         most_recent = self.successResultOf(
-            self.homeserver.datastore.get_latest_event_ids_in_room(self.room_id)
+            maybeDeferred(self.homeserver.datastore.get_latest_event_ids_in_room, self.room_id)
         )[0]
 
         join_event = FrozenEvent(
@@ -72,7 +72,7 @@ class MessageAcceptTests(unittest.TestCase):
         # Make sure we actually joined the room
         self.assertEqual(
             self.successResultOf(
-                self.homeserver.datastore.get_latest_event_ids_in_room(self.room_id)
+                maybeDeferred(self.homeserver.datastore.get_latest_event_ids_in_room, self.room_id)
             )[0],
             "$join:test.serv",
         )
@@ -92,7 +92,7 @@ class MessageAcceptTests(unittest.TestCase):
 
         # Figure out what the most recent event is
         most_recent = self.successResultOf(
-            self.homeserver.datastore.get_latest_event_ids_in_room(self.room_id)
+            maybeDeferred(self.homeserver.datastore.get_latest_event_ids_in_room, self.room_id)
         )[0]
 
         # Now lie about an event
@@ -129,7 +129,7 @@ class MessageAcceptTests(unittest.TestCase):
         )
 
         # Make sure the invalid event isn't there
-        extrem = self.homeserver.datastore.get_latest_event_ids_in_room(self.room_id)
+        extrem = maybeDeferred(self.homeserver.datastore.get_latest_event_ids_in_room, self.room_id)
         self.assertEqual(self.successResultOf(extrem)[0], "$join:test.serv")
 
     @unittest.DEBUG
@@ -161,7 +161,6 @@ class MessageAcceptTests(unittest.TestCase):
         self.http_client.post_json = post_json
 
         def get_json(destination, path, args, headers=None):
-            print(destination, path, args)
             if path.startswith("/_matrix/federation/v1/state_ids/"):
                 d = self.successResultOf(
                     self.homeserver.datastore.get_state_ids_for_event("one:test.serv")
@@ -182,7 +181,7 @@ class MessageAcceptTests(unittest.TestCase):
 
         # Figure out what the most recent event is
         most_recent = self.successResultOf(
-            self.homeserver.datastore.get_latest_event_ids_in_room(self.room_id)
+            maybeDeferred(self.homeserver.datastore.get_latest_event_ids_in_room, self.room_id)
         )[0]
 
         # Make a good event
@@ -227,7 +226,7 @@ class MessageAcceptTests(unittest.TestCase):
         )
         self.reactor.advance(1)
 
-        extrem = self.homeserver.datastore.get_latest_event_ids_in_room(self.room_id)
+        extrem = maybeDeferred(self.homeserver.datastore.get_latest_event_ids_in_room, self.room_id)
         self.assertEqual(self.successResultOf(extrem)[0], "two:test.serv")
 
         state = self.homeserver.get_state_handler().get_current_state_ids(self.room_id)