rework format of change password capability

This commit is contained in:
Neil Johnson 2019-01-29 18:04:56 +00:00
parent 19259d903c
commit e4bef9d470
2 changed files with 5 additions and 3 deletions

View file

@ -68,11 +68,11 @@ class CapabilitiesTestCase(unittest.HomeserverTestCase):
self.assertEqual(channel.code, 200)
# Test case where password is handled outside of Synapse
self.assertTrue(capabilities['m.change_password'])
self.assertTrue(capabilities['m.change_password']['enabled'])
self.get_success(self.store.user_set_password_hash(user, None))
request, channel = self.make_request("GET", self.url, access_token=access_token)
self.render(request)
capabilities = channel.json_body['capabilities']
self.assertEqual(channel.code, 200)
self.assertFalse(capabilities['m.change_password'])
self.assertFalse(capabilities['m.change_password']['enabled'])