mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-29 17:42:12 +08:00
Use encode() method instead of bytearray()
to encode a Unicode string to a binary one.
This commit is contained in:
@@ -14,7 +14,7 @@ class AuthenticationApiTestCase(api.ApiTestCase):
|
||||
self._setup_user(TEST_USER_EMAIL, TEST_USER_PASSWORD)
|
||||
baseauth_url = self._api_url("authenticate/baseauth", use_key=False)
|
||||
unencoded_credentials = "%s:%s" % (TEST_USER_EMAIL, TEST_USER_PASSWORD)
|
||||
authorization = base64.b64encode(bytearray(unencoded_credentials, encoding="utf-8"))
|
||||
authorization = base64.b64encode(unencoded_credentials.encode("utf-8"))
|
||||
headers = {
|
||||
"Authorization": authorization,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user