mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 16:16:07 -04:00
Add a make_event_from_dict
method (#6858)
... and use it in places where it's trivial to do so. This will make it easier to pass room versions into the FrozenEvent constructors.
This commit is contained in:
parent
b08b0a22d5
commit
799001f2c0
13 changed files with 52 additions and 39 deletions
|
@ -2,7 +2,7 @@ from mock import Mock
|
|||
|
||||
from twisted.internet.defer import ensureDeferred, maybeDeferred, succeed
|
||||
|
||||
from synapse.events import FrozenEvent
|
||||
from synapse.events import make_event_from_dict
|
||||
from synapse.logging.context import LoggingContext
|
||||
from synapse.types import Requester, UserID
|
||||
from synapse.util import Clock
|
||||
|
@ -43,7 +43,7 @@ class MessageAcceptTests(unittest.TestCase):
|
|||
)
|
||||
)[0]
|
||||
|
||||
join_event = FrozenEvent(
|
||||
join_event = make_event_from_dict(
|
||||
{
|
||||
"room_id": self.room_id,
|
||||
"sender": "@baduser:test.serv",
|
||||
|
@ -105,7 +105,7 @@ class MessageAcceptTests(unittest.TestCase):
|
|||
)[0]
|
||||
|
||||
# Now lie about an event
|
||||
lying_event = FrozenEvent(
|
||||
lying_event = make_event_from_dict(
|
||||
{
|
||||
"room_id": self.room_id,
|
||||
"sender": "@baduser:test.serv",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue