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_event_auth.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_event_auth.py')
-rw-r--r-- | tests/test_event_auth.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_event_auth.py b/tests/test_event_auth.py index ca20b085a2..bfa5d6f510 100644 --- a/tests/test_event_auth.py +++ b/tests/test_event_auth.py @@ -18,7 +18,7 @@ import unittest from synapse import event_auth from synapse.api.errors import AuthError from synapse.api.room_versions import RoomVersions -from synapse.events import FrozenEvent +from synapse.events import make_event_from_dict class EventAuthTestCase(unittest.TestCase): @@ -94,7 +94,7 @@ TEST_ROOM_ID = "!test:room" def _create_event(user_id): - return FrozenEvent( + return make_event_from_dict( { "room_id": TEST_ROOM_ID, "event_id": _get_event_id(), @@ -106,7 +106,7 @@ def _create_event(user_id): def _join_event(user_id): - return FrozenEvent( + return make_event_from_dict( { "room_id": TEST_ROOM_ID, "event_id": _get_event_id(), @@ -119,7 +119,7 @@ def _join_event(user_id): def _power_levels_event(sender, content): - return FrozenEvent( + return make_event_from_dict( { "room_id": TEST_ROOM_ID, "event_id": _get_event_id(), @@ -132,7 +132,7 @@ def _power_levels_event(sender, content): def _random_state_event(sender): - return FrozenEvent( + return make_event_from_dict( { "room_id": TEST_ROOM_ID, "event_id": _get_event_id(), |