result.json: Upgrade test_bots.

This commit is contained in:
Umair Khan 2017-08-17 11:29:14 +05:00 committed by Tim Abbott
parent 1c09f95e0e
commit de5f43ea47

View File

@ -38,7 +38,7 @@ class BotTest(ZulipTestCase, UploadSerializeMixin):
bot_info.update(extras)
result = self.client_post("/json/bots", bot_info)
self.assert_json_success(result)
return ujson.loads(result.content)
return result.json()
def test_bot_domain(self):
# type: () -> None
@ -468,7 +468,7 @@ class BotTest(ZulipTestCase, UploadSerializeMixin):
def get_bot(self):
# type: () -> Dict[str, Any]
result = self.client_get("/json/bots")
bots = ujson.loads(result.content)['bots']
bots = result.json()['bots']
return bots[0]
def test_update_api_key(self):