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/test_visibility.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/test_visibility.py')
-rw-r--r-- | tests/test_visibility.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/test_visibility.py b/tests/test_visibility.py index a7a36174ea..531a9b9118 100644 --- a/tests/test_visibility.py +++ b/tests/test_visibility.py @@ -40,7 +40,7 @@ class FilterEventsForServerTestCase(tests.unittest.TestCase): self.store = self.hs.get_datastore() self.storage = self.hs.get_storage() - yield create_room(self.hs, TEST_ROOM_ID, "@someone:ROOM") + yield defer.ensureDeferred(create_room(self.hs, TEST_ROOM_ID, "@someone:ROOM")) @defer.inlineCallbacks def test_filtering(self): @@ -140,7 +140,9 @@ class FilterEventsForServerTestCase(tests.unittest.TestCase): event, context = yield defer.ensureDeferred( self.event_creation_handler.create_new_client_event(builder) ) - yield self.storage.persistence.persist_event(event, context) + yield defer.ensureDeferred( + self.storage.persistence.persist_event(event, context) + ) return event @defer.inlineCallbacks @@ -162,7 +164,9 @@ class FilterEventsForServerTestCase(tests.unittest.TestCase): self.event_creation_handler.create_new_client_event(builder) ) - yield self.storage.persistence.persist_event(event, context) + yield defer.ensureDeferred( + self.storage.persistence.persist_event(event, context) + ) return event @defer.inlineCallbacks @@ -183,7 +187,9 @@ class FilterEventsForServerTestCase(tests.unittest.TestCase): self.event_creation_handler.create_new_client_event(builder) ) - yield self.storage.persistence.persist_event(event, context) + yield defer.ensureDeferred( + self.storage.persistence.persist_event(event, context) + ) return event @defer.inlineCallbacks |