diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-07-17 07:09:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-17 07:09:25 -0400 |
commit | 6b3ac3b8cddda9911f42a08a0dcefc4a3386ff51 (patch) | |
tree | e563590dfec473a88e347b6e0a4422f89af3ef6c /tests/handlers/test_device.py | |
parent | Convert synapse.app to async/await. (#7868) (diff) | |
download | synapse-6b3ac3b8cddda9911f42a08a0dcefc4a3386ff51.tar.xz |
Convert device handler to async/await (#7871)
Diffstat (limited to 'tests/handlers/test_device.py')
-rw-r--r-- | tests/handlers/test_device.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/handlers/test_device.py b/tests/handlers/test_device.py index 62b47f6574..6aa322bf3a 100644 --- a/tests/handlers/test_device.py +++ b/tests/handlers/test_device.py @@ -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): |