mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-12 15:32:11 -04:00
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.
This commit is contained in:
parent
61bfcd669a
commit
c9b9143655
9 changed files with 226 additions and 129 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue