mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-14 06:25:24 -04:00
Additional constants for EDU types. (#12884)
Instead of hard-coding strings in many places.
This commit is contained in:
parent
d9f092285b
commit
c52abc1cfd
35 changed files with 146 additions and 96 deletions
|
@ -26,6 +26,7 @@ from twisted.test.proto_helpers import MemoryReactor
|
|||
|
||||
import synapse.rest.admin
|
||||
from synapse.api.constants import (
|
||||
EduTypes,
|
||||
EventContentFields,
|
||||
EventTypes,
|
||||
Membership,
|
||||
|
@ -1412,7 +1413,7 @@ class RoomInitialSyncTestCase(RoomBase):
|
|||
e["content"]["user_id"]: e for e in channel.json_body["presence"]
|
||||
}
|
||||
self.assertTrue(self.user_id in presence_by_user)
|
||||
self.assertEqual("m.presence", presence_by_user[self.user_id]["type"])
|
||||
self.assertEqual(EduTypes.PRESENCE, presence_by_user[self.user_id]["type"])
|
||||
|
||||
|
||||
class RoomMessageListTestCase(RoomBase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue