From ed12419061267c9877332d6251b8da19956abe19 Mon Sep 17 00:00:00 2001 From: Umair Khan Date: Wed, 16 Aug 2017 12:51:15 +0500 Subject: [PATCH] test_reactions: Upgrade to HttpResponse.json(). --- zerver/tests/test_reactions.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/zerver/tests/test_reactions.py b/zerver/tests/test_reactions.py index d1f2c02a54..684f2100bc 100644 --- a/zerver/tests/test_reactions.py +++ b/zerver/tests/test_reactions.py @@ -209,8 +209,7 @@ class ReactionMessageIDTest(ZulipTestCase): "to": pm_recipient}, **self.api_auth(pm_sender)) self.assert_json_success(result) - content = ujson.loads(result.content) - pm_id = content['id'] + pm_id = result.json()['id'] result = self.client_put('/api/v1/messages/%s/emoji_reactions/smile' % (pm_id,), **self.api_auth(reaction_sender)) self.assert_json_error(result, "Invalid message(s)") @@ -285,8 +284,7 @@ class ReactionEventTest(ZulipTestCase): "to": pm_recipient.email}, **self.api_auth(pm_sender.email)) self.assert_json_success(result) - content = ujson.loads(result.content) - pm_id = content['id'] + pm_id = result.json()['id'] expected_recipient_ids = set([pm_sender.id, pm_recipient.id])