mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-23 03:00:41 -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
|
@ -2913,7 +2913,8 @@ class UserMembershipRestTestCase(unittest.HomeserverTestCase):
|
|||
other_user_tok = self.login("user", "pass")
|
||||
event_builder_factory = self.hs.get_event_builder_factory()
|
||||
event_creation_handler = self.hs.get_event_creation_handler()
|
||||
storage_controllers = self.hs.get_storage_controllers()
|
||||
persistence = self.hs.get_storage_controllers().persistence
|
||||
assert persistence is not None
|
||||
|
||||
# Create two rooms, one with a local user only and one with both a local
|
||||
# and remote user.
|
||||
|
@ -2940,7 +2941,7 @@ class UserMembershipRestTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
context = self.get_success(unpersisted_context.persist(event))
|
||||
|
||||
self.get_success(storage_controllers.persistence.persist_event(event, context))
|
||||
self.get_success(persistence.persist_event(event, context))
|
||||
|
||||
# Now get rooms
|
||||
url = "/_synapse/admin/v1/users/@joiner:remote_hs/joined_rooms"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue