diff --git a/common/lib/xmodule/xmodule/video_module/transcripts_utils.py b/common/lib/xmodule/xmodule/video_module/transcripts_utils.py index a293595819..5009feb497 100644 --- a/common/lib/xmodule/xmodule/video_module/transcripts_utils.py +++ b/common/lib/xmodule/xmodule/video_module/transcripts_utils.py @@ -5,7 +5,7 @@ Utility functions for transcripts. from __future__ import absolute_import import copy -import json +import simplejson as json import logging import os from functools import wraps diff --git a/lms/djangoapps/courseware/tests/test_video_handlers.py b/lms/djangoapps/courseware/tests/test_video_handlers.py index 519a789bf2..ace597aaad 100644 --- a/lms/djangoapps/courseware/tests/test_video_handlers.py +++ b/lms/djangoapps/courseware/tests/test_video_handlers.py @@ -416,7 +416,7 @@ class TestTranscriptAvailableTranslationsBumperDispatch(TestVideo): request = Request.blank('/' + self.dispatch) response = self.item.transcript(request=request, dispatch=self.dispatch) - self.assertEqual(json.loads(response.body.decode('utf-8')), [lang]) + self.assertEqual(json.loads(response.body), [lang]) @patch('xmodule.video_module.transcripts_utils.get_available_transcript_languages') def test_multiple_available_translations(self, mock_get_transcript_languages): diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py index 483f4124e4..730f201bb8 100644 --- a/lms/djangoapps/verify_student/tests/test_views.py +++ b/lms/djangoapps/verify_student/tests/test_views.py @@ -5,7 +5,7 @@ Tests of verify_student views. from __future__ import absolute_import -import json +import simplejson as json from datetime import timedelta from uuid import uuid4 @@ -1637,7 +1637,7 @@ class TestSubmitPhotosForVerification(TestCase): def _get_post_data(self): """Retrieve POST data from the last request. """ last_request = moto.packages.httpretty.last_request() - return json.loads(last_request.body.decode('utf-8')) + return json.loads(last_request.body) class TestPhotoVerificationResultsCallback(ModuleStoreTestCase): diff --git a/requirements/edx/base.in b/requirements/edx/base.in index 9d53532d7f..fdbf3a175a 100644 --- a/requirements/edx/base.in +++ b/requirements/edx/base.in @@ -140,6 +140,7 @@ redis==2.10.6 # celery task broker requests-oauthlib # Simplifies use of OAuth via the requests library, used for CCX and LTI random2 rules # Django extension for rules-based authorization checks +simplejson sailthru-client==2.2.3 # For Sailthru integration Shapely # Geometry library, used for image click regions in capa six # Utilities for supporting Python 2 & 3 in the same codebase diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 8f8eee3c51..6f259a1305 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -224,7 +224,7 @@ scipy==1.2.1 semantic-version==2.8.2 # via edx-drf-extensions shapely==1.6.4.post2 shortuuid==0.5.0 # via edx-django-oauth2-provider -simplejson==3.16.0 # via mailsnake, sailthru-client +simplejson==3.16.0 singledispatch==3.4.0.3 six==1.12.0 slumber==0.7.1 # via edx-bulk-grades, edx-enterprise, edx-rest-api-client