summary refs log tree commit diff
path: root/tests/handlers/test_room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-26 12:06:36 +0000
committerErik Johnston <erik@matrix.org>2014-11-26 12:06:36 +0000
commit48ee9ddb22b36f1adc23290e76287a922488596d (patch)
treed9eccedd90f9c573634c5456cfbbb65684214c6e /tests/handlers/test_room.py
parentUse tagged version of matrix-angular-sdk (diff)
parentBump version numbers and change log (diff)
downloadsynapse-48ee9ddb22b36f1adc23290e76287a922488596d.tar.xz
Merge branch 'release-v0.5.1' of github.com:matrix-org/synapse v0.5.1
Diffstat (limited to 'tests/handlers/test_room.py')
-rw-r--r--tests/handlers/test_room.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/handlers/test_room.py b/tests/handlers/test_room.py
index cbe591ab90..0279ab703a 100644
--- a/tests/handlers/test_room.py
+++ b/tests/handlers/test_room.py
@@ -120,7 +120,7 @@ class RoomMemberHandlerTestCase(unittest.TestCase):
 
         self.datastore.get_room_member.return_value = defer.succeed(None)
 
-        event.state_events = {
+        event.old_state_events = {
             (RoomMemberEvent.TYPE, "@alice:green"): self._create_member(
                 user_id="@alice:green",
                 room_id=room_id,
@@ -129,9 +129,11 @@ class RoomMemberHandlerTestCase(unittest.TestCase):
                 user_id="@bob:red",
                 room_id=room_id,
             ),
-            (RoomMemberEvent.TYPE, target_user_id): event,
         }
 
+        event.state_events = event.old_state_events
+        event.state_events[(RoomMemberEvent.TYPE, target_user_id)] = event
+
         # Actual invocation
         yield self.room_member_handler.change_membership(event)
 
@@ -187,6 +189,16 @@ class RoomMemberHandlerTestCase(unittest.TestCase):
             (RoomMemberEvent.TYPE, user_id): event,
         }
 
+        event.old_state_events = {
+            (RoomMemberEvent.TYPE, "@alice:green"): self._create_member(
+                user_id="@alice:green",
+                room_id=room_id,
+            ),
+        }
+
+        event.state_events = event.old_state_events
+        event.state_events[(RoomMemberEvent.TYPE, user_id)] = event
+
         # Actual invocation
         yield self.room_member_handler.change_membership(event)