From f679768f9e7c49a872b0c6d8fdd7811fa714b79e Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Tue, 15 Oct 2019 12:57:49 +0500 Subject: [PATCH] BOM-925 Fixing TypeError, the JSON object must be str, not 'bytes'. --- lms/djangoapps/verify_student/tests/test_views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py index 4c2d5818bc..483f4124e4 100644 --- a/lms/djangoapps/verify_student/tests/test_views.py +++ b/lms/djangoapps/verify_student/tests/test_views.py @@ -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) + return json.loads(last_request.body.decode('utf-8')) class TestPhotoVerificationResultsCallback(ModuleStoreTestCase):