diff options
author | Erik Johnston <erik@matrix.org> | 2019-12-06 16:02:50 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-12-06 16:02:50 +0000 |
commit | 852f80d8a697c9d556b1b2641a2e4c1797cbbb46 (patch) | |
tree | c41b92be858914b5b38f637f638c55ec78117d6d /tests/test_federation.py | |
parent | Move start up DB checks to main data store. (diff) | |
download | synapse-852f80d8a697c9d556b1b2641a2e4c1797cbbb46.tar.xz |
Fixup tests
Diffstat (limited to 'tests/test_federation.py')
-rw-r--r-- | tests/test_federation.py | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/tests/test_federation.py b/tests/test_federation.py index 7d82b58466..ad165d7295 100644 --- a/tests/test_federation.py +++ b/tests/test_federation.py @@ -33,6 +33,8 @@ class MessageAcceptTests(unittest.TestCase): self.reactor.advance(0.1) self.room_id = self.successResultOf(room)["room_id"] + self.store = self.homeserver.get_datastore() + # Figure out what the most recent event is most_recent = self.successResultOf( maybeDeferred( @@ -77,10 +79,7 @@ class MessageAcceptTests(unittest.TestCase): # Make sure we actually joined the room self.assertEqual( self.successResultOf( - maybeDeferred( - self.homeserver.get_datastore().get_latest_event_ids_in_room, - self.room_id, - ) + maybeDeferred(self.store.get_latest_event_ids_in_room, self.room_id) )[0], "$join:test.serv", ) @@ -100,10 +99,7 @@ class MessageAcceptTests(unittest.TestCase): # Figure out what the most recent event is most_recent = self.successResultOf( - maybeDeferred( - self.homeserver.get_datastore().get_latest_event_ids_in_room, - self.room_id, - ) + maybeDeferred(self.store.get_latest_event_ids_in_room, self.room_id) )[0] # Now lie about an event @@ -141,7 +137,5 @@ class MessageAcceptTests(unittest.TestCase): ) # Make sure the invalid event isn't there - extrem = maybeDeferred( - self.homeserver.get_datastore().get_latest_event_ids_in_room, self.room_id - ) + extrem = maybeDeferred(self.store.get_latest_event_ids_in_room, self.room_id) self.assertEqual(self.successResultOf(extrem)[0], "$join:test.serv") |