summary refs log tree commit diff
path: root/tests/state/test_v2.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-12-13 12:55:32 +0000
committerRichard van der Hoff <richard@matrix.org>2019-12-16 13:53:53 +0000
commit83895316d4e18d4a52c43524942d98f864bac6f9 (patch)
treeede0cb55827c18f07838ef02a57a7625e7e88f9a /tests/state/test_v2.py
parentSanity-check room ids in event auth (#6530) (diff)
downloadsynapse-83895316d4e18d4a52c43524942d98f864bac6f9.tar.xz
sanity-checking for events used in state res (#6531)
When we perform state resolution, check that all of the events involved are in
the right room.
Diffstat (limited to 'tests/state/test_v2.py')
-rw-r--r--tests/state/test_v2.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/state/test_v2.py b/tests/state/test_v2.py
index 8d3845c870..0f341d3ac3 100644
--- a/tests/state/test_v2.py
+++ b/tests/state/test_v2.py
@@ -58,6 +58,7 @@ class FakeEvent(object):
         self.type = type
         self.state_key = state_key
         self.content = content
+        self.room_id = ROOM_ID
 
     def to_event(self, auth_events, prev_events):
         """Given the auth_events and prev_events, convert to a Frozen Event
@@ -418,6 +419,7 @@ class StateTestCase(unittest.TestCase):
                 state_before = dict(state_at_event[prev_events[0]])
             else:
                 state_d = resolve_events_with_store(
+                    ROOM_ID,
                     RoomVersions.V2.identifier,
                     [state_at_event[n] for n in prev_events],
                     event_map=event_map,
@@ -565,6 +567,7 @@ class SimpleParamStateTestCase(unittest.TestCase):
         # Test that we correctly handle passing `None` as the event_map
 
         state_d = resolve_events_with_store(
+            ROOM_ID,
             RoomVersions.V2.identifier,
             [self.state_at_bob, self.state_at_charlie],
             event_map=None,