result.json: Upgrade test_settings.

This commit is contained in:
Umair Khan 2017-08-17 11:44:10 +05:00 committed by Tim Abbott
parent d44c1e7070
commit eb04fc006e
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ class UserChangesTest(ZulipTestCase):
old_api_key = user.api_key old_api_key = user.api_key
result = self.client_post('/json/users/me/api_key/regenerate') result = self.client_post('/json/users/me/api_key/regenerate')
self.assert_json_success(result) self.assert_json_success(result)
new_api_key = ujson.loads(result.content)['api_key'] new_api_key = result.json()['api_key']
self.assertNotEqual(old_api_key, new_api_key) self.assertNotEqual(old_api_key, new_api_key)
user = self.example_user('hamlet') user = self.example_user('hamlet')
self.assertEqual(new_api_key, user.api_key) self.assertEqual(new_api_key, user.api_key)