diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-07-24 09:39:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-24 09:39:02 -0400 |
commit | 5ea29d7f850b6d2acbbfaf2e81bc5f0625411320 (patch) | |
tree | 02322e5d5fefaab399b4277d77009f119bae8d90 /tests/rest/media | |
parent | Return an empty body for OPTIONS requests. (#7886) (diff) | |
download | synapse-5ea29d7f850b6d2acbbfaf2e81bc5f0625411320.tar.xz |
Convert more of the media code to async/await (#7873)
Diffstat (limited to 'tests/rest/media')
-rw-r--r-- | tests/rest/media/v1/test_media_storage.py | 5 |
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) |