From 5ab7d84d76894eec5de040383a4aba2323faa956 Mon Sep 17 00:00:00 2001 From: Ayub khan Date: Wed, 4 Sep 2019 16:21:31 +0500 Subject: [PATCH] BOM-280 python3 compatibility --- lms/djangoapps/lti_provider/tests/test_signature_validator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/lti_provider/tests/test_signature_validator.py b/lms/djangoapps/lti_provider/tests/test_signature_validator.py index 367f415b49..2b746846f6 100644 --- a/lms/djangoapps/lti_provider/tests/test_signature_validator.py +++ b/lms/djangoapps/lti_provider/tests/test_signature_validator.py @@ -111,10 +111,10 @@ class SignatureValidatorTest(TestCase): Verify that the signature validaton library method is called using the correct parameters derived from the HttpRequest. """ - body = 'oauth_signature_method=HMAC-SHA1&oauth_version=1.0' + body = u'oauth_signature_method=HMAC-SHA1&oauth_version=1.0' content_type = 'application/x-www-form-urlencoded' request = RequestFactory().post('/url', body, content_type=content_type) headers = {'Content-Type': content_type} SignatureValidator(self.lti_consumer).verify(request) verify_mock.assert_called_once_with( - request.build_absolute_uri(), 'POST', body, headers) + request.build_absolute_uri(), 'POST', body.encode('utf-8'), headers)