diff options
author | Erik Johnston <erik@matrix.org> | 2020-02-26 15:33:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 15:33:26 +0000 |
commit | 1f773eec912e4908ab60f7823f5c0a024261af4d (patch) | |
tree | 3b75bb043a46554b1296003cd9974a0b35ce6a8c /tests/handlers | |
parent | Updated warning for incorrect database collation/ctype (#6985) (diff) | |
download | synapse-1f773eec912e4908ab60f7823f5c0a024261af4d.tar.xz |
Port PresenceHandler to async/await (#6991)
Diffstat (limited to 'tests/handlers')
-rw-r--r-- | tests/handlers/test_presence.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/handlers/test_presence.py b/tests/handlers/test_presence.py index 64915bafcd..05ea40a7de 100644 --- a/tests/handlers/test_presence.py +++ b/tests/handlers/test_presence.py @@ -494,8 +494,10 @@ class PresenceJoinTestCase(unittest.HomeserverTestCase): self.helper.join(room_id, "@test2:server") # Mark test2 as online, test will be offline with a last_active of 0 - self.presence_handler.set_state( - UserID.from_string("@test2:server"), {"presence": PresenceState.ONLINE} + self.get_success( + self.presence_handler.set_state( + UserID.from_string("@test2:server"), {"presence": PresenceState.ONLINE} + ) ) self.reactor.pump([0]) # Wait for presence updates to be handled @@ -543,14 +545,18 @@ class PresenceJoinTestCase(unittest.HomeserverTestCase): room_id = self.helper.create_room_as(self.user_id) # Mark test as online - self.presence_handler.set_state( - UserID.from_string("@test:server"), {"presence": PresenceState.ONLINE} + self.get_success( + self.presence_handler.set_state( + UserID.from_string("@test:server"), {"presence": PresenceState.ONLINE} + ) ) # Mark test2 as online, test will be offline with a last_active of 0. # Note we don't join them to the room yet - self.presence_handler.set_state( - UserID.from_string("@test2:server"), {"presence": PresenceState.ONLINE} + self.get_success( + self.presence_handler.set_state( + UserID.from_string("@test2:server"), {"presence": PresenceState.ONLINE} + ) ) # Add servers to the room |