summary refs log tree commit diff
path: root/tests/storage/test_stream.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/storage/test_stream.py')
-rw-r--r--tests/storage/test_stream.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/storage/test_stream.py b/tests/storage/test_stream.py
index 4865a5c142..9247fc579e 100644
--- a/tests/storage/test_stream.py
+++ b/tests/storage/test_stream.py
@@ -18,8 +18,7 @@ from tests import unittest
 from twisted.internet import defer
 
 from synapse.server import HomeServer
-from synapse.api.constants import Membership
-from synapse.api.events.room import RoomMemberEvent, MessageEvent
+from synapse.api.constants import EventTypes, Membership
 
 from tests.utils import SQLiteMemoryDbPool, MockKey
 
@@ -62,7 +61,7 @@ class StreamStoreTestCase(unittest.TestCase):
         self.depth += 1
 
         builder = self.event_builder_factory.new({
-            "type": RoomMemberEvent.TYPE,
+            "type": EventTypes.Member,
             "sender": user.to_string(),
             "state_key": user.to_string(),
             "room_id": room.to_string(),
@@ -82,7 +81,7 @@ class StreamStoreTestCase(unittest.TestCase):
         self.depth += 1
 
         builder = self.event_builder_factory.new({
-            "type": MessageEvent.TYPE,
+            "type": EventTypes.Message,
             "sender": user.to_string(),
             "state_key": user.to_string(),
             "room_id": room.to_string(),
@@ -125,7 +124,7 @@ class StreamStoreTestCase(unittest.TestCase):
 
         self.assertObjectHasAttributes(
             {
-                "type": MessageEvent.TYPE,
+                "type": EventTypes.Message,
                 "user_id": self.u_alice.to_string(),
                 "content": {"body": "test", "msgtype": "message"},
             },
@@ -162,7 +161,7 @@ class StreamStoreTestCase(unittest.TestCase):
 
         self.assertObjectHasAttributes(
             {
-                "type": MessageEvent.TYPE,
+                "type": EventTypes.Message,
                 "user_id": self.u_alice.to_string(),
                 "content": {"body": "test", "msgtype": "message"},
             },