summary refs log tree commit diff
path: root/tests/events/test_presence_router.py
diff options
context:
space:
mode:
authorJonathan de Jong <jonathan@automatia.nl>2021-07-13 12:52:58 +0200
committerGitHub <noreply@github.com>2021-07-13 11:52:58 +0100
commit93729719b8451493e1df9930feb9f02f14ea5cef (patch)
tree90f9608894f30f35c824427aa8b3657a41246bdd /tests/events/test_presence_router.py
parent[pyupgrade] `tests/` (#10347) (diff)
downloadsynapse-93729719b8451493e1df9930feb9f02f14ea5cef.tar.xz
Use inline type hints in `tests/` (#10350)
This PR is tantamount to running:

    python3.8 -m com2ann -v 6 tests/

(com2ann requires python 3.8 to run)
Diffstat (limited to 'tests/events/test_presence_router.py')
-rw-r--r--tests/events/test_presence_router.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/events/test_presence_router.py b/tests/events/test_presence_router.py
index 875b0d0a11..c4ad33194d 100644
--- a/tests/events/test_presence_router.py
+++ b/tests/events/test_presence_router.py
@@ -152,7 +152,7 @@ class PresenceRouterTestCase(FederatingHomeserverTestCase):
         )
         self.assertEqual(len(presence_updates), 1)
 
-        presence_update = presence_updates[0]  # type: UserPresenceState
+        presence_update: UserPresenceState = presence_updates[0]
         self.assertEqual(presence_update.user_id, self.other_user_one_id)
         self.assertEqual(presence_update.state, "online")
         self.assertEqual(presence_update.status_msg, "boop")
@@ -274,7 +274,7 @@ class PresenceRouterTestCase(FederatingHomeserverTestCase):
         presence_updates, _ = sync_presence(self, self.other_user_id)
         self.assertEqual(len(presence_updates), 1)
 
-        presence_update = presence_updates[0]  # type: UserPresenceState
+        presence_update: UserPresenceState = presence_updates[0]
         self.assertEqual(presence_update.user_id, self.other_user_id)
         self.assertEqual(presence_update.state, "online")
         self.assertEqual(presence_update.status_msg, "I'm online!")
@@ -320,7 +320,7 @@ class PresenceRouterTestCase(FederatingHomeserverTestCase):
         )
         for call in calls:
             call_args = call[0]
-            federation_transaction = call_args[0]  # type: Transaction
+            federation_transaction: Transaction = call_args[0]
 
             # Get the sent EDUs in this transaction
             edus = federation_transaction.get_dict()["edus"]