summary refs log tree commit diff
path: root/tests/state
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/state
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/state')
-rw-r--r--tests/state/test_v2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/state/test_v2.py b/tests/state/test_v2.py
index 0f341d3ac3..5bafad9f19 100644
--- a/tests/state/test_v2.py
+++ b/tests/state/test_v2.py
@@ -22,7 +22,7 @@ import attr
 from synapse.api.constants import EventTypes, JoinRules, Membership
 from synapse.api.room_versions import RoomVersions
 from synapse.event_auth import auth_types_for_event
-from synapse.events import FrozenEvent
+from synapse.events import make_event_from_dict
 from synapse.state.v2 import lexicographical_topological_sort, resolve_events_with_store
 from synapse.types import EventID
 
@@ -89,7 +89,7 @@ class FakeEvent(object):
         if self.state_key is not None:
             event_dict["state_key"] = self.state_key
 
-        return FrozenEvent(event_dict)
+        return make_event_from_dict(event_dict)
 
 
 # All graphs start with this set of events