mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-26 01:50:26 -04:00
Add final type hint to tests.unittest. (#15072)
Adds a return type to HomeServerTestCase.make_homeserver and deal with any variables which are no longer Any.
This commit is contained in:
parent
119e0795a5
commit
42aea0d8af
55 changed files with 433 additions and 320 deletions
|
@ -13,7 +13,7 @@
|
|||
# limitations under the License.
|
||||
from unittest.mock import Mock
|
||||
|
||||
from synapse.handlers.typing import RoomMember
|
||||
from synapse.handlers.typing import RoomMember, TypingWriterHandler
|
||||
from synapse.replication.tcp.streams import TypingStream
|
||||
from synapse.util.caches.stream_change_cache import StreamChangeCache
|
||||
|
||||
|
@ -33,6 +33,7 @@ class TypingStreamTestCase(BaseStreamTestCase):
|
|||
|
||||
def test_typing(self) -> None:
|
||||
typing = self.hs.get_typing_handler()
|
||||
assert isinstance(typing, TypingWriterHandler)
|
||||
|
||||
self.reconnect()
|
||||
|
||||
|
@ -88,6 +89,7 @@ class TypingStreamTestCase(BaseStreamTestCase):
|
|||
sends the proper position and RDATA).
|
||||
"""
|
||||
typing = self.hs.get_typing_handler()
|
||||
assert isinstance(typing, TypingWriterHandler)
|
||||
|
||||
self.reconnect()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue