summary refs log tree commit diff
path: root/tests/rest/client/test_sync.py
diff options
context:
space:
mode:
authorŠimon Brandner <simon.bra.ag@gmail.com>2022-04-28 13:34:12 -0400
committerPatrick Cloke <patrickc@matrix.org>2022-04-28 13:34:33 -0400
commit0d9eaa19fd4f934d2a249bc8fb0191fbac30dd0d (patch)
tree830686ffb649b50d689ffc0dcd289988d61fcbcd /tests/rest/client/test_sync.py
parentFix logging of incorrect status codes for disconnected requests (#12580) (diff)
downloadsynapse-0d9eaa19fd4f934d2a249bc8fb0191fbac30dd0d.tar.xz
Use constants for receipt types in tests. (#12582)
Diffstat (limited to 'tests/rest/client/test_sync.py')
-rw-r--r--tests/rest/client/test_sync.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/rest/client/test_sync.py b/tests/rest/client/test_sync.py
index 773c16a54c..cb765455c1 100644
--- a/tests/rest/client/test_sync.py
+++ b/tests/rest/client/test_sync.py
@@ -24,6 +24,7 @@ from synapse.api.constants import (
     EventContentFields,
     EventTypes,
     ReadReceiptEventFields,
+    ReceiptTypes,
     RelationTypes,
 )
 from synapse.rest.client import devices, knock, login, read_marker, receipts, room, sync
@@ -560,7 +561,7 @@ class UnreadMessagesTestCase(unittest.HomeserverTestCase):
         self._check_unread_count(1)
 
         # Send a read receipt to tell the server we've read the latest event.
-        body = json.dumps({"m.read": res["event_id"]}).encode("utf8")
+        body = json.dumps({ReceiptTypes.READ: res["event_id"]}).encode("utf8")
         channel = self.make_request(
             "POST",
             "/rooms/%s/read_markers" % self.room_id,