python: Replace ujson with orjson.

Fixes #6507.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-08-06 16:09:47 -07:00
committed by Tim Abbott
parent 123790a72d
commit 61d0417e75
132 changed files with 1319 additions and 1238 deletions

View File

@@ -1,7 +1,7 @@
from typing import Any
from unittest.mock import patch
import ujson
import orjson
from django.http import HttpResponse
from zerver.lib.test_classes import ZulipTestCase
@@ -15,7 +15,7 @@ class ZephyrTest(ZulipTestCase):
self.login_user(user)
def post(subdomain: Any, **kwargs: Any) -> HttpResponse:
params = {k: ujson.dumps(v) for k, v in kwargs.items()}
params = {k: orjson.dumps(v).decode() for k, v in kwargs.items()}
return self.client_post('/accounts/webathena_kerberos_login/', params,
subdomain=subdomain)