Fix redaction storage test
This commit is contained in:
parent
cc44ecc62f
commit
da80ebcc6b
|
@ -61,6 +61,7 @@ class RedactionTestCase(unittest.TestCase):
|
||||||
membership=membership,
|
membership=membership,
|
||||||
content={"membership": membership},
|
content={"membership": membership},
|
||||||
depth=self.depth,
|
depth=self.depth,
|
||||||
|
prev_events=[],
|
||||||
)
|
)
|
||||||
|
|
||||||
event.content.update(extra_content)
|
event.content.update(extra_content)
|
||||||
|
@ -68,6 +69,9 @@ class RedactionTestCase(unittest.TestCase):
|
||||||
if prev_state:
|
if prev_state:
|
||||||
event.prev_state = prev_state
|
event.prev_state = prev_state
|
||||||
|
|
||||||
|
event.state_events = None
|
||||||
|
event.hashes = {}
|
||||||
|
|
||||||
# Have to create a join event using the eventfactory
|
# Have to create a join event using the eventfactory
|
||||||
yield self.store.persist_event(
|
yield self.store.persist_event(
|
||||||
event
|
event
|
||||||
|
@ -85,8 +89,12 @@ class RedactionTestCase(unittest.TestCase):
|
||||||
room_id=room.to_string(),
|
room_id=room.to_string(),
|
||||||
content={"body": body, "msgtype": u"message"},
|
content={"body": body, "msgtype": u"message"},
|
||||||
depth=self.depth,
|
depth=self.depth,
|
||||||
|
prev_events=[],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
event.state_events = None
|
||||||
|
event.hashes = {}
|
||||||
|
|
||||||
yield self.store.persist_event(
|
yield self.store.persist_event(
|
||||||
event
|
event
|
||||||
)
|
)
|
||||||
|
@ -102,8 +110,12 @@ class RedactionTestCase(unittest.TestCase):
|
||||||
content={"reason": reason},
|
content={"reason": reason},
|
||||||
depth=self.depth,
|
depth=self.depth,
|
||||||
redacts=event_id,
|
redacts=event_id,
|
||||||
|
prev_events=[],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
event.state_events = None
|
||||||
|
event.hashes = {}
|
||||||
|
|
||||||
yield self.store.persist_event(
|
yield self.store.persist_event(
|
||||||
event
|
event
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue