summary refs log tree commit diff
path: root/tests/rest
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-07-24 09:39:02 -0400
committerGitHub <noreply@github.com>2020-07-24 09:39:02 -0400
commit5ea29d7f850b6d2acbbfaf2e81bc5f0625411320 (patch)
tree02322e5d5fefaab399b4277d77009f119bae8d90 /tests/rest
parentReturn an empty body for OPTIONS requests. (#7886) (diff)
downloadsynapse-5ea29d7f850b6d2acbbfaf2e81bc5f0625411320.tar.xz
Convert more of the media code to async/await (#7873)
Diffstat (limited to 'tests/rest')
-rw-r--r--tests/rest/media/v1/test_media_storage.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/rest/media/v1/test_media_storage.py b/tests/rest/media/v1/test_media_storage.py

index 66fa5978b2..f4f3e56777 100644 --- a/tests/rest/media/v1/test_media_storage.py +++ b/tests/rest/media/v1/test_media_storage.py
@@ -26,6 +26,7 @@ import attr from parameterized import parameterized_class from PIL import Image as Image +from twisted.internet import defer from twisted.internet.defer import Deferred from synapse.logging.context import make_deferred_yieldable @@ -77,7 +78,9 @@ class MediaStorageTests(unittest.HomeserverTestCase): # This uses a real blocking threadpool so we have to wait for it to be # actually done :/ - x = self.media_storage.ensure_media_is_in_local_cache(file_info) + x = defer.ensureDeferred( + self.media_storage.ensure_media_is_in_local_cache(file_info) + ) # Hotloop until the threadpool does its job... self.wait_on_thread(x)