diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-07-28 16:09:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-28 16:09:53 -0400 |
commit | 3345c166a45cb4a8f87c583ee0476c2bca5c41bd (patch) | |
tree | 8bc5a87a123313c2da008e4a82d0621459b717c5 /tests/storage/test_purge.py | |
parent | Add an option to disable purge in delete room admin API (#7964) (diff) | |
download | synapse-3345c166a45cb4a8f87c583ee0476c2bca5c41bd.tar.xz |
Convert storage layer to async/await. (#7963)
Diffstat (limited to 'tests/storage/test_purge.py')
-rw-r--r-- | tests/storage/test_purge.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/storage/test_purge.py b/tests/storage/test_purge.py index b9fafaa1a6..a6012c973d 100644 --- a/tests/storage/test_purge.py +++ b/tests/storage/test_purge.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from twisted.internet import defer + from synapse.rest.client.v1 import room from tests.unittest import HomeserverTestCase @@ -49,7 +51,9 @@ class PurgeTests(HomeserverTestCase): event = self.successResultOf(event) # Purge everything before this topological token - purge = storage.purge_events.purge_history(self.room_id, event, True) + purge = defer.ensureDeferred( + storage.purge_events.purge_history(self.room_id, event, True) + ) self.pump() self.assertEqual(self.successResultOf(purge), None) @@ -88,7 +92,7 @@ class PurgeTests(HomeserverTestCase): ) # Purge everything before this topological token - purge = storage.purge_history(self.room_id, event, True) + purge = defer.ensureDeferred(storage.purge_history(self.room_id, event, True)) self.pump() f = self.failureResultOf(purge) self.assertIn("greater than forward", f.value.args[0]) |