Proper types for tests.module_api (#15031)

* -> None for test methods

* A first batch of type fixes

* Introduce common parent test case

* Fixup that big test method

* tests.module_api passes mypy

* Changelog
This commit is contained in:
David Robertson 2023-02-09 00:23:35 +00:00 committed by GitHub
parent 30509a1010
commit 7081bb56e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 80 additions and 54 deletions

View file

@ -31,7 +31,11 @@ from synapse.util import Clock
from tests.handlers.test_sync import generate_sync_config
from tests.test_utils import simple_async_mock
from tests.unittest import FederatingHomeserverTestCase, override_config
from tests.unittest import (
FederatingHomeserverTestCase,
HomeserverTestCase,
override_config,
)
@attr.s
@ -470,7 +474,7 @@ class PresenceRouterTestCase(FederatingHomeserverTestCase):
def send_presence_update(
testcase: FederatingHomeserverTestCase,
testcase: HomeserverTestCase,
user_id: str,
access_token: str,
presence_state: str,
@ -491,7 +495,7 @@ def send_presence_update(
def sync_presence(
testcase: FederatingHomeserverTestCase,
testcase: HomeserverTestCase,
user_id: str,
since_token: Optional[StreamToken] = None,
) -> Tuple[List[UserPresenceState], StreamToken]: