mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Fix type hints in knocking tests. (#14887)
This commit is contained in:
parent
8a7d2de51f
commit
836c592f15
1
changelog.d/14887.misc
Normal file
1
changelog.d/14887.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Add missing type hints.
|
1
mypy.ini
1
mypy.ini
@ -39,7 +39,6 @@ exclude = (?x)
|
|||||||
|tests/events/test_utils.py
|
|tests/events/test_utils.py
|
||||||
|tests/federation/test_federation_catch_up.py
|
|tests/federation/test_federation_catch_up.py
|
||||||
|tests/federation/test_federation_sender.py
|
|tests/federation/test_federation_sender.py
|
||||||
|tests/federation/transport/test_knocking.py
|
|
||||||
|tests/handlers/test_typing.py
|
|tests/handlers/test_typing.py
|
||||||
|tests/http/federation/test_matrix_federation_agent.py
|
|tests/http/federation/test_matrix_federation_agent.py
|
||||||
|tests/http/federation/test_srv_resolver.py
|
|tests/http/federation/test_srv_resolver.py
|
||||||
|
@ -23,10 +23,10 @@ from synapse.server import HomeServer
|
|||||||
from synapse.types import RoomAlias
|
from synapse.types import RoomAlias
|
||||||
|
|
||||||
from tests.test_utils import event_injection
|
from tests.test_utils import event_injection
|
||||||
from tests.unittest import FederatingHomeserverTestCase, TestCase
|
from tests.unittest import FederatingHomeserverTestCase, HomeserverTestCase
|
||||||
|
|
||||||
|
|
||||||
class KnockingStrippedStateEventHelperMixin(TestCase):
|
class KnockingStrippedStateEventHelperMixin(HomeserverTestCase):
|
||||||
def send_example_state_events_to_room(
|
def send_example_state_events_to_room(
|
||||||
self,
|
self,
|
||||||
hs: "HomeServer",
|
hs: "HomeServer",
|
||||||
@ -49,7 +49,7 @@ class KnockingStrippedStateEventHelperMixin(TestCase):
|
|||||||
# To set a canonical alias, we'll need to point an alias at the room first.
|
# To set a canonical alias, we'll need to point an alias at the room first.
|
||||||
canonical_alias = "#fancy_alias:test"
|
canonical_alias = "#fancy_alias:test"
|
||||||
self.get_success(
|
self.get_success(
|
||||||
self.store.create_room_alias_association(
|
self.hs.get_datastores().main.create_room_alias_association(
|
||||||
RoomAlias.from_string(canonical_alias), room_id, ["test"]
|
RoomAlias.from_string(canonical_alias), room_id, ["test"]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -294,9 +294,7 @@ class SyncTypingTests(unittest.HomeserverTestCase):
|
|||||||
self.make_request("GET", sync_url % (access_token, next_batch))
|
self.make_request("GET", sync_url % (access_token, next_batch))
|
||||||
|
|
||||||
|
|
||||||
class SyncKnockTestCase(
|
class SyncKnockTestCase(KnockingStrippedStateEventHelperMixin):
|
||||||
unittest.HomeserverTestCase, KnockingStrippedStateEventHelperMixin
|
|
||||||
):
|
|
||||||
servlets = [
|
servlets = [
|
||||||
synapse.rest.admin.register_servlets,
|
synapse.rest.admin.register_servlets,
|
||||||
login.register_servlets,
|
login.register_servlets,
|
||||||
|
Loading…
Reference in New Issue
Block a user