Merge pull request #21990 from edx/BOM-911

Added the util to handle bytes input to json.loads function - BOM-911
This commit is contained in:
Aarif
2019-10-17 01:24:36 +05:00
committed by GitHub
5 changed files with 6 additions and 5 deletions

View File

@@ -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

View File

@@ -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):

View File

@@ -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):

View File

@@ -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

View File

@@ -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