Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 836c592

Browse files
Fix type hints in knocking tests. (#14887)
1 parent 8a7d2de commit 836c592

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

changelog.d/14887.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add missing type hints.

mypy.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ exclude = (?x)
3939
|tests/events/test_utils.py
4040
|tests/federation/test_federation_catch_up.py
4141
|tests/federation/test_federation_sender.py
42-
|tests/federation/transport/test_knocking.py
4342
|tests/handlers/test_typing.py
4443
|tests/http/federation/test_matrix_federation_agent.py
4544
|tests/http/federation/test_srv_resolver.py

tests/federation/transport/test_knocking.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
from synapse.types import RoomAlias
2424

2525
from tests.test_utils import event_injection
26-
from tests.unittest import FederatingHomeserverTestCase, TestCase
26+
from tests.unittest import FederatingHomeserverTestCase, HomeserverTestCase
2727

2828

29-
class KnockingStrippedStateEventHelperMixin(TestCase):
29+
class KnockingStrippedStateEventHelperMixin(HomeserverTestCase):
3030
def send_example_state_events_to_room(
3131
self,
3232
hs: "HomeServer",
@@ -49,7 +49,7 @@ def send_example_state_events_to_room(
4949
# To set a canonical alias, we'll need to point an alias at the room first.
5050
canonical_alias = "#fancy_alias:test"
5151
self.get_success(
52-
self.store.create_room_alias_association(
52+
self.hs.get_datastores().main.create_room_alias_association(
5353
RoomAlias.from_string(canonical_alias), room_id, ["test"]
5454
)
5555
)

tests/rest/client/test_sync.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,7 @@ def test_sync_backwards_typing(self) -> None:
294294
self.make_request("GET", sync_url % (access_token, next_batch))
295295

296296

297-
class SyncKnockTestCase(
298-
unittest.HomeserverTestCase, KnockingStrippedStateEventHelperMixin
299-
):
297+
class SyncKnockTestCase(KnockingStrippedStateEventHelperMixin):
300298
servlets = [
301299
synapse.rest.admin.register_servlets,
302300
login.register_servlets,

0 commit comments

Comments
 (0)