From 2c6b2f32dd488fef750bde6fd10cc6cd460e088b Mon Sep 17 00:00:00 2001 From: jinder1s Date: Thu, 3 Oct 2019 10:09:18 -0400 Subject: [PATCH] converting unicode to byte where necessary --- openedx/core/lib/api/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx/core/lib/api/test_utils.py b/openedx/core/lib/api/test_utils.py index 789a58035f..b2c116ac4d 100644 --- a/openedx/core/lib/api/test_utils.py +++ b/openedx/core/lib/api/test_utils.py @@ -23,7 +23,7 @@ class ApiTestCase(TestCase): """ Returns a dictionary containing the http auth header with encoded username+password """ - return {'HTTP_AUTHORIZATION': 'Basic ' + base64.b64encode('%s:%s' % (username, password))} + return {'HTTP_AUTHORIZATION': b'Basic ' + base64.b64encode(b'%s:%s' % (username.encode(), password.encode()))} def request_with_auth(self, method, *args, **kwargs): """Issue a request to the given URI with the API key header"""