Use constants for receipt types in tests. (#12582)

This commit is contained in:
Šimon Brandner 2022-04-28 13:34:12 -04:00 committed by Patrick Cloke
parent 0b684b59e5
commit 0d9eaa19fd
4 changed files with 30 additions and 23 deletions

View file

@ -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,