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)