summary refs log tree commit diff
path: root/tests/crypto/test_event_signing.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/crypto/test_event_signing.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/crypto/test_event_signing.py')
-rw-r--r--tests/crypto/test_event_signing.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/crypto/test_event_signing.py b/tests/crypto/test_event_signing.py
index 6143a50ab2..62f639a18d 100644
--- a/tests/crypto/test_event_signing.py
+++ b/tests/crypto/test_event_signing.py
@@ -19,7 +19,7 @@ from unpaddedbase64 import decode_base64
 
 from synapse.api.room_versions import RoomVersions
 from synapse.crypto.event_signing import add_hashes_and_signatures
-from synapse.events import FrozenEvent
+from synapse.events import make_event_from_dict
 
 from tests import unittest
 
@@ -54,7 +54,7 @@ class EventSigningTestCase(unittest.TestCase):
             RoomVersions.V1, event_dict, HOSTNAME, self.signing_key
         )
 
-        event = FrozenEvent(event_dict)
+        event = make_event_from_dict(event_dict)
 
         self.assertTrue(hasattr(event, "hashes"))
         self.assertIn("sha256", event.hashes)
@@ -88,7 +88,7 @@ class EventSigningTestCase(unittest.TestCase):
             RoomVersions.V1, event_dict, HOSTNAME, self.signing_key
         )
 
-        event = FrozenEvent(event_dict)
+        event = make_event_from_dict(event_dict)
 
         self.assertTrue(hasattr(event, "hashes"))
         self.assertIn("sha256", event.hashes)