mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 14:24:18 -04:00
Add type hints for tests/unittest.py
. (#12347)
In particular, add type hints for get_success and friends, which are then helpful in a bunch of places.
This commit is contained in:
parent
33ebee47e4
commit
f0b03186d9
12 changed files with 97 additions and 48 deletions
|
@ -351,6 +351,7 @@ class UserDirectoryTestCase(unittest.HomeserverTestCase):
|
|||
self.handler.handle_local_profile_change(regular_user_id, profile_info)
|
||||
)
|
||||
profile = self.get_success(self.store.get_user_in_directory(regular_user_id))
|
||||
assert profile is not None
|
||||
self.assertTrue(profile["display_name"] == display_name)
|
||||
|
||||
def test_handle_local_profile_change_with_deactivated_user(self) -> None:
|
||||
|
@ -369,6 +370,7 @@ class UserDirectoryTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# profile is in directory
|
||||
profile = self.get_success(self.store.get_user_in_directory(r_user_id))
|
||||
assert profile is not None
|
||||
self.assertTrue(profile["display_name"] == display_name)
|
||||
|
||||
# deactivate user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue