Skip to content
This repository was archived by the owner on Aug 22, 2019. It is now read-only.

Commit 387c7bf

Browse files
authored
Ensures the password is properly unquoted for the (shotgunsoftware#178)
1 parent f161241 commit 387c7bf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import base64
66
import datetime
7+
import urllib
78
import re
89
try:
910
import simplejson as json
@@ -147,7 +148,7 @@ def test_url(self):
147148
# login:password@domain
148149
auth_url = "%s%s@%s" % (self.uri_prefix, login_password, self.domain)
149150
sg = api.Shotgun(auth_url, None, None, connect=False)
150-
expected = "Basic " + base64.encodestring(login_password).strip()
151+
expected = "Basic " + base64.encodestring(urllib.unquote(login_password)).strip()
151152
self.assertEqual(expected, sg.config.authorization)
152153

153154
def test_authorization(self):
@@ -167,7 +168,7 @@ def test_authorization(self):
167168
args, _ = self.sg._http_request.call_args
168169
verb, path, body, headers = args
169170

170-
expected = "Basic " + base64.encodestring(login_password).strip()
171+
expected = "Basic " + base64.encodestring(urllib.unquote(login_password)).strip()
171172
self.assertEqual(expected, headers.get("Authorization"))
172173

173174
def test_user_agent(self):

0 commit comments

Comments
 (0)