diff options
Diffstat (limited to 'tests/module_api/test_api.py')
-rw-r--r-- | tests/module_api/test_api.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/module_api/test_api.py b/tests/module_api/test_api.py index dee248801d..9fd5d59c55 100644 --- a/tests/module_api/test_api.py +++ b/tests/module_api/test_api.py @@ -87,24 +87,22 @@ class ModuleApiTestCase(HomeserverTestCase): self.assertEqual(displayname, "Bobberino") def test_can_register_admin_user(self): - user_id = self.get_success( - self.register_user( - "bob_module_admin", "1234", displayname="Bobberino Admin", admin=True - ) + user_id = self.register_user( + "bob_module_admin", "1234", displayname="Bobberino Admin", admin=True ) + found_user = self.get_success(self.module_api.get_userinfo_by_id(user_id)) self.assertEqual(found_user.user_id.to_string(), user_id) self.assertIdentical(found_user.is_admin, True) def test_can_set_admin(self): - user_id = self.get_success( - self.register_user( - "alice_wants_admin", - "1234", - displayname="Alice Powerhungry", - admin=False, - ) + user_id = self.register_user( + "alice_wants_admin", + "1234", + displayname="Alice Powerhungry", + admin=False, ) + self.get_success(self.module_api.set_user_admin(user_id, True)) found_user = self.get_success(self.module_api.get_userinfo_by_id(user_id)) self.assertEqual(found_user.user_id.to_string(), user_id) |