Skip to content
Snippets Groups Projects
Unverified Commit 14e8e782 authored by Awais Qureshi's avatar Awais Qureshi Committed by GitHub
Browse files

Merge pull request #22013 from edx/awais786/BOM-917

BOM-917
parents b254df3c ae9dcdef
No related branches found
No related tags found
No related merge requests found
......@@ -86,6 +86,6 @@ class ApiTestCase(TestCase):
# Django rest framework interprets basic auth headers
# as an attempt to authenticate with the API.
# We don't want this for views available to anonymous users.
basic_auth_header = "Basic " + base64.b64encode('username:password')
basic_auth_header = b"Basic " + base64.b64encode('username:password'.encode('utf-8'))
response = getattr(self.client, method)(uri, HTTP_AUTHORIZATION=basic_auth_header)
self.assertNotEqual(response.status_code, 403)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment