Skip to content

Commit de0b967

Browse files
author
Lita Cho
committed
updated
1 parent 2222aec commit de0b967

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def test_request(self, mock):
2222
mock.assert_called_with("GET", "https://api.twilio.com/2010-04-01",
2323
headers={"User-Agent": ANY,
2424
'Accept-Charset': 'utf-8',
25-
'authorization':
25+
'Authorization':
2626
'Basic QUNDT1VOVF9TSUQ6QVVUSF9UT0tFTg=='},
2727
params={}, auth=AUTH, data=None)
2828
called_kwargs = mock.mock_calls[0][2]

twilio/rest/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def request(self, path, method=None, vars=None):
110110
headers = {
111111
"User-Agent": user_agent,
112112
"Accept-Charset": "utf-8",
113-
"authorization": 'Basic ' + base64.b64encode("%s:%s" % self.auth).strip()
113+
"Authorization": "Basic {}".format(base64.b64encode(':'.join(self.auth)))
114114
}
115115

116116
resp = make_request(method, uri, auth=self.auth, data=data,

0 commit comments

Comments
 (0)