mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-19 04:57:47 -04:00
Add more missing type hints to tests. (#15028)
This commit is contained in:
parent
4eed7b2ede
commit
30509a1010
14 changed files with 124 additions and 111 deletions
|
@ -14,8 +14,12 @@
|
|||
|
||||
import os
|
||||
|
||||
from twisted.test.proto_helpers import MemoryReactor
|
||||
|
||||
import synapse.rest.admin
|
||||
from synapse.rest.client import login, room, sync
|
||||
from synapse.server import HomeServer
|
||||
from synapse.util import Clock
|
||||
|
||||
from tests import unittest
|
||||
|
||||
|
@ -29,7 +33,7 @@ class ConsentNoticesTests(unittest.HomeserverTestCase):
|
|||
room.register_servlets,
|
||||
]
|
||||
|
||||
def make_homeserver(self, reactor, clock):
|
||||
def make_homeserver(self, reactor: MemoryReactor, clock: Clock) -> HomeServer:
|
||||
|
||||
tmpdir = self.mktemp()
|
||||
os.mkdir(tmpdir)
|
||||
|
@ -53,15 +57,13 @@ class ConsentNoticesTests(unittest.HomeserverTestCase):
|
|||
"room_name": "Server Notices",
|
||||
}
|
||||
|
||||
hs = self.setup_test_homeserver(config=config)
|
||||
return self.setup_test_homeserver(config=config)
|
||||
|
||||
return hs
|
||||
|
||||
def prepare(self, reactor, clock, hs):
|
||||
def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer) -> None:
|
||||
self.user_id = self.register_user("bob", "abc123")
|
||||
self.access_token = self.login("bob", "abc123")
|
||||
|
||||
def test_get_sync_message(self):
|
||||
def test_get_sync_message(self) -> None:
|
||||
"""
|
||||
When user consent server notices are enabled, a sync will cause a notice
|
||||
to fire (in a room which the user is invited to). The notice contains
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue