tests: Refactor away result.json() calls with helpers.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li
2022-06-06 19:37:01 -04:00
committed by Tim Abbott
parent a6e2453323
commit a142fbff85
33 changed files with 345 additions and 419 deletions

View File

@@ -362,8 +362,7 @@ class PushBouncerNotificationTest(BouncerTestCase):
payload,
content_type="application/json",
)
self.assert_json_success(result)
data = result.json()
data = self.assert_json_success(result)
self.assertEqual(
{"result": "success", "msg": "", "total_android_devices": 2, "total_apple_devices": 1},
data,