diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-05-27 07:14:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-27 07:14:36 -0400 |
commit | c52abc1cfdd9e5480cdb4a03d626fe61cacc6573 (patch) | |
tree | 0859f49a5d1e69ce8c844ba9d785c67a2a747854 /tests/rest/client/test_events.py | |
parent | Remove federation client code for groups. (#12563) (diff) | |
download | synapse-c52abc1cfdd9e5480cdb4a03d626fe61cacc6573.tar.xz |
Additional constants for EDU types. (#12884)
Instead of hard-coding strings in many places.
Diffstat (limited to 'tests/rest/client/test_events.py')
-rw-r--r-- | tests/rest/client/test_events.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/rest/client/test_events.py b/tests/rest/client/test_events.py index 1b1392fa2f..a9b7db9db2 100644 --- a/tests/rest/client/test_events.py +++ b/tests/rest/client/test_events.py @@ -19,6 +19,7 @@ from unittest.mock import Mock from twisted.test.proto_helpers import MemoryReactor import synapse.rest.admin +from synapse.api.constants import EduTypes from synapse.rest.client import events, login, room from synapse.server import HomeServer from synapse.util import Clock @@ -103,7 +104,7 @@ class EventStreamPermissionsTestCase(unittest.HomeserverTestCase): c for c in channel.json_body["chunk"] if not ( - c.get("type") == "m.presence" + c.get("type") == EduTypes.PRESENCE and c["content"].get("user_id") == self.user_id ) ] |