summary refs log tree commit diff
path: root/tests/storage/test_redaction.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-05 13:27:20 +0000
committerErik Johnston <erik@matrix.org>2014-11-05 13:28:57 +0000
commitda80ebcc6b0bd15095d092eacd0ea55c81bb03b4 (patch)
treea69dd97c6144a6ce6e2efe5009372a25cc270aff /tests/storage/test_redaction.py
parentGet correct prev_events (diff)
downloadsynapse-da80ebcc6b0bd15095d092eacd0ea55c81bb03b4.tar.xz
Fix redaction storage test
Diffstat (limited to 'tests/storage/test_redaction.py')
-rw-r--r--tests/storage/test_redaction.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/storage/test_redaction.py b/tests/storage/test_redaction.py
index dae1641ea1..fb175a5c4c 100644
--- a/tests/storage/test_redaction.py
+++ b/tests/storage/test_redaction.py
@@ -61,6 +61,7 @@ class RedactionTestCase(unittest.TestCase):
             membership=membership,
             content={"membership": membership},
             depth=self.depth,
+            prev_events=[],
         )
 
         event.content.update(extra_content)
@@ -68,6 +69,9 @@ class RedactionTestCase(unittest.TestCase):
         if prev_state:
             event.prev_state = prev_state
 
+        event.state_events = None
+        event.hashes = {}
+
         # Have to create a join event using the eventfactory
         yield self.store.persist_event(
             event
@@ -85,8 +89,12 @@ class RedactionTestCase(unittest.TestCase):
             room_id=room.to_string(),
             content={"body": body, "msgtype": u"message"},
             depth=self.depth,
+            prev_events=[],
         )
 
+        event.state_events = None
+        event.hashes = {}
+
         yield self.store.persist_event(
             event
         )
@@ -102,8 +110,12 @@ class RedactionTestCase(unittest.TestCase):
             content={"reason": reason},
             depth=self.depth,
             redacts=event_id,
+            prev_events=[],
         )
 
+        event.state_events = None
+        event.hashes = {}
+
         yield self.store.persist_event(
             event
         )