mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
tests: Refactor away result.json() calls with helpers.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
committed by
Tim Abbott
parent
a6e2453323
commit
a142fbff85
@@ -55,8 +55,7 @@ class MutedUsersTests(ZulipTestCase):
|
||||
"bot_type": "1",
|
||||
}
|
||||
result = self.client_post("/json/bots", bot_info)
|
||||
self.assert_json_success(result)
|
||||
muted_id = result.json()["user_id"]
|
||||
muted_id = self.assert_json_success(result)["user_id"]
|
||||
|
||||
url = f"/api/v1/users/me/muted_users/{muted_id}"
|
||||
result = self.api_post(hamlet, url)
|
||||
|
||||
Reference in New Issue
Block a user