diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-02-07 15:30:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 15:30:04 +0000 |
commit | 799001f2c0b31d72b95a252a3808da25987e1ed3 (patch) | |
tree | 4ef02d19d99632feae18b69907d8a4913ea281ce /tests/test_federation.py | |
parent | Add typing to synapse.federation.sender (#6871) (diff) | |
download | synapse-799001f2c0b31d72b95a252a3808da25987e1ed3.tar.xz |
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.
Diffstat (limited to 'tests/test_federation.py')
-rw-r--r-- | tests/test_federation.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_federation.py b/tests/test_federation.py index 68684460c6..9b5cf562f3 100644 --- a/tests/test_federation.py +++ b/tests/test_federation.py @@ -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", |