mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-26 14:55:15 -04:00
Type hints for tests.appservice (#14990)
* Accept a Sequence of events in synapse.appservice This avoids some casts/ignores in the tests I'm about to fixup. It seems that `List[Mock]` is not a subtype of `List[EventBase]`, but `Sequence[Mock]` is a subtype of `Sequence[EventBase]`. So presumably `Mock` is considered a subtype of anything, much like `Any`. * make tests.appservice.test_scheduler pass mypy * Extra hints in tests.appservice.test_scheduler * Extra hints in tests.appservice.test_api * Extra hints in tests.appservice.test_appservice * Disallow untyped defs * Changelog
This commit is contained in:
parent
3e37ff1a7e
commit
e8269ed391
9 changed files with 132 additions and 59 deletions
|
@ -29,7 +29,7 @@ URL = "http://mytestservice"
|
|||
|
||||
|
||||
class ApplicationServiceApiTestCase(unittest.HomeserverTestCase):
|
||||
def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer):
|
||||
def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer) -> None:
|
||||
self.api = hs.get_application_service_api()
|
||||
self.service = ApplicationService(
|
||||
id="unique_identifier",
|
||||
|
@ -39,7 +39,7 @@ class ApplicationServiceApiTestCase(unittest.HomeserverTestCase):
|
|||
hs_token=TOKEN,
|
||||
)
|
||||
|
||||
def test_query_3pe_authenticates_token(self):
|
||||
def test_query_3pe_authenticates_token(self) -> None:
|
||||
"""
|
||||
Tests that 3pe queries to the appservice are authenticated
|
||||
with the appservice's token.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue