summary refs log tree commit diff
path: root/tests/test_federation.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-02-07 15:30:04 +0000
committerGitHub <noreply@github.com>2020-02-07 15:30:04 +0000
commit799001f2c0b31d72b95a252a3808da25987e1ed3 (patch)
tree4ef02d19d99632feae18b69907d8a4913ea281ce /tests/test_federation.py
parentAdd typing to synapse.federation.sender (#6871) (diff)
downloadsynapse-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.py6
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",