Fixing TypeError, the JSON object must be str, not 'bytes'.
This commit is contained in:
Awais Qureshi
2019-10-15 12:57:49 +05:00
parent ce18f581c7
commit f679768f9e

View File

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