diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-04-06 07:21:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 07:21:02 -0400 |
commit | e7b769aea14495fec61386f5d42098843eb20525 (patch) | |
tree | c06c1eebb072f8191ab33bc12645d1420142f85c /tests/storage/test_redaction.py | |
parent | Update mypy configuration: `no_implicit_optional = True` (#9742) (diff) | |
download | synapse-e7b769aea14495fec61386f5d42098843eb20525.tar.xz |
Convert storage test cases to HomeserverTestCase. (#9736)
Diffstat (limited to 'tests/storage/test_redaction.py')
-rw-r--r-- | tests/storage/test_redaction.py | 12 |
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 |