mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 06:34:56 -04:00
Convert device handler to async/await (#7871)
This commit is contained in:
parent
00e57b755c
commit
6b3ac3b8cd
6 changed files with 162 additions and 166 deletions
|
@ -142,10 +142,8 @@ class DeviceTestCase(unittest.HomeserverTestCase):
|
|||
self.get_success(self.handler.delete_device(user1, "abc"))
|
||||
|
||||
# check the device was deleted
|
||||
res = self.handler.get_device(user1, "abc")
|
||||
self.pump()
|
||||
self.assertIsInstance(
|
||||
self.failureResultOf(res).value, synapse.api.errors.NotFoundError
|
||||
self.get_failure(
|
||||
self.handler.get_device(user1, "abc"), synapse.api.errors.NotFoundError
|
||||
)
|
||||
|
||||
# we'd like to check the access token was invalidated, but that's a
|
||||
|
@ -180,10 +178,9 @@ class DeviceTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
def test_update_unknown_device(self):
|
||||
update = {"display_name": "new_display"}
|
||||
res = self.handler.update_device("user_id", "unknown_device_id", update)
|
||||
self.pump()
|
||||
self.assertIsInstance(
|
||||
self.failureResultOf(res).value, synapse.api.errors.NotFoundError
|
||||
self.get_failure(
|
||||
self.handler.update_device("user_id", "unknown_device_id", update),
|
||||
synapse.api.errors.NotFoundError,
|
||||
)
|
||||
|
||||
def _record_users(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue