From 3858911007f85703ea9ef1d870421c25e0482158 Mon Sep 17 00:00:00 2001 From: Luc Charland Date: Tue, 21 Apr 2015 09:59:50 -0400 Subject: [PATCH] Changed login from urlencoded to json --- Tests/Integration/sogoLogin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tests/Integration/sogoLogin.py b/Tests/Integration/sogoLogin.py index 6eef104c9..f700e300e 100644 --- a/Tests/Integration/sogoLogin.py +++ b/Tests/Integration/sogoLogin.py @@ -14,8 +14,9 @@ def getAuthCookie(hostname, port, username, password) : opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cjar)) urllib2.install_opener(opener) - creds = urllib.urlencode([("userName",username), ("password", password)]) - req = urllib2.Request("http://%s:%s/SOGo/connect" % (hostname, port), creds) + creds2 = simplejson.dumps({"userName":username, "password": password}) + req = urllib2.Request("http://%s:%s/SOGo/connect" % (hostname, port), creds2, + {'Content-Type': 'application/json'}) fd = urllib2.urlopen(req)