diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-02-08 16:29:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-08 16:29:49 -0500 |
commit | 30509a1010f10bc7924146cac57571c4b24914d7 (patch) | |
tree | 27f0185c1241923b423643751fcfb3c5d142f778 /tests/server_notices/test_consent.py | |
parent | Add missing type hints to tests. (#15027) (diff) | |
download | synapse-30509a1010f10bc7924146cac57571c4b24914d7.tar.xz |
Add more missing type hints to tests. (#15028)
Diffstat (limited to 'tests/server_notices/test_consent.py')
-rw-r--r-- | tests/server_notices/test_consent.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/server_notices/test_consent.py b/tests/server_notices/test_consent.py index 58b399a043..6540ed53f1 100644 --- a/tests/server_notices/test_consent.py +++ b/tests/server_notices/test_consent.py @@ -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 hs + return self.setup_test_homeserver(config=config) - 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 |