summary refs log tree commit diff
path: root/tests/storage/test_redaction.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2021-04-08 18:30:38 +0100
committerRichard van der Hoff <richard@matrix.org>2021-04-08 18:30:38 +0100
commit9e167d9c53af8be7386ba7e2bd14ce385471df87 (patch)
treee5578a06584477e553b8e0eea11c3aa1f40dc2b5 /tests/storage/test_redaction.py
parentremove unused param on `make_tuple_comparison_clause` (diff)
parentMerge pull request #9769 from matrix-org/rav/fix_bionic (diff)
downloadsynapse-9e167d9c53af8be7386ba7e2bd14ce385471df87.tar.xz
Merge remote-tracking branch 'origin/develop' into rav/drop_py35
Diffstat (limited to 'tests/storage/test_redaction.py')
-rw-r--r--tests/storage/test_redaction.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/storage/test_redaction.py b/tests/storage/test_redaction.py
index b2a0e60856..2622207639 100644
--- a/tests/storage/test_redaction.py
+++ b/tests/storage/test_redaction.py
@@ -1,6 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright 2014-2016 OpenMarket Ltd
-# Copyright 2019 The Matrix.org Foundation C.I.C.
+# Copyright 2014-2021 The Matrix.org Foundation C.I.C.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -16,8 +15,6 @@
 
 from canonicaljson import json
 
-from twisted.internet import defer
-
 from synapse.api.constants import EventTypes, Membership
 from synapse.api.room_versions import RoomVersions
 from synapse.types import RoomID, UserID
@@ -230,10 +227,9 @@ class RedactionTestCase(unittest.HomeserverTestCase):
                 self._base_builder = base_builder
                 self._event_id = event_id
 
-            @defer.inlineCallbacks
-            def build(self, prev_event_ids, auth_event_ids):
-                built_event = yield defer.ensureDeferred(
-                    self._base_builder.build(prev_event_ids, auth_event_ids)
+            async def build(self, prev_event_ids, auth_event_ids):
+                built_event = await self._base_builder.build(
+                    prev_event_ids, auth_event_ids
                 )
 
                 built_event._event_id = self._event_id