diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-02-17 13:19:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-17 18:19:38 +0000 |
commit | c9b9143655d39ef691bd21ebc03434feb0dc377f (patch) | |
tree | 7337697cd6d0fcecace3a7344960e28430635e63 /tests/unittest.py | |
parent | Add account data to export command (#14969) (diff) | |
download | synapse-c9b9143655d39ef691bd21ebc03434feb0dc377f.tar.xz |
Fix-up type hints in tests/server.py. (#15084)
This file was being ignored by mypy, we remove that and add the missing type hints & deal with any fallout.
Diffstat (limited to 'tests/unittest.py')
-rw-r--r-- | tests/unittest.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/unittest.py b/tests/unittest.py index c1cb5933fa..b21e7f1221 100644 --- a/tests/unittest.py +++ b/tests/unittest.py @@ -45,7 +45,7 @@ from typing_extensions import Concatenate, ParamSpec, Protocol from twisted.internet.defer import Deferred, ensureDeferred from twisted.python.failure import Failure from twisted.python.threadpool import ThreadPool -from twisted.test.proto_helpers import MemoryReactor +from twisted.test.proto_helpers import MemoryReactor, MemoryReactorClock from twisted.trial import unittest from twisted.web.resource import Resource from twisted.web.server import Request @@ -82,7 +82,7 @@ from tests.server import ( ) from tests.test_utils import event_injection, setup_awaitable_errors from tests.test_utils.logging_setup import setup_logging -from tests.utils import default_config, setupdb +from tests.utils import checked_cast, default_config, setupdb setupdb() setup_logging() @@ -296,7 +296,12 @@ class HomeserverTestCase(TestCase): from tests.rest.client.utils import RestHelper - self.helper = RestHelper(self.hs, self.site, getattr(self, "user_id", None)) + self.helper = RestHelper( + self.hs, + checked_cast(MemoryReactorClock, self.hs.get_reactor()), + self.site, + getattr(self, "user_id", None), + ) if hasattr(self, "user_id"): if self.hijack_auth: |