summary refs log tree commit diff
path: root/tests/test_utils
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2022-01-19 10:59:51 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2022-01-19 10:59:51 +0000
commit20d441848571384622a573f749f9772becf855e7 (patch)
tree82d7fc5028740641eb2bcc52d564a132ed3357cc /tests/test_utils
parentMerge branch 'release-v1.50' into matrix-org-hotfixes (diff)
parentFix preview of imgur and Tenor URLs. (#11669) (diff)
downloadsynapse-20d441848571384622a573f749f9772becf855e7.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'tests/test_utils')
-rw-r--r--tests/test_utils/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_utils/__init__.py b/tests/test_utils/__init__.py

index 15ac2bfeba..f05a373aa0 100644 --- a/tests/test_utils/__init__.py +++ b/tests/test_utils/__init__.py
@@ -19,7 +19,7 @@ import sys import warnings from asyncio import Future from binascii import unhexlify -from typing import Any, Awaitable, Callable, TypeVar +from typing import Awaitable, Callable, TypeVar from unittest.mock import Mock import attr @@ -46,7 +46,7 @@ def get_awaitable_result(awaitable: Awaitable[TV]) -> TV: raise Exception("awaitable has not yet completed") -def make_awaitable(result: Any) -> Awaitable[Any]: +def make_awaitable(result: TV) -> Awaitable[TV]: """ Makes an awaitable, suitable for mocking an `async` function. This uses Futures as they can be awaited multiple times so can be returned