Restores proper PUT method for user update now that KSL supports it.

Change-Id: Ifd68a9878489efa29442f1035d0393ada9c6d3ff
This commit is contained in:
Gabriel Hurley
2012-02-16 11:56:59 -08:00
parent ed5ca4e841
commit 0414cf1ef2
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ class UserManager(base.ManagerWithFind):
params = {"user": kwargs}
params['user']['id'] = base.getid(user)
url = "/users/%s" % base.getid(user)
return self._update(url, params, "user", method="POST")
return self._update(url, params, "user")
def update_enabled(self, user, enabled):
"""

View File

@@ -176,7 +176,7 @@ class UserTests(utils.TestCase):
resp_4 = httplib2.Response({"status": 200, "body": json.dumps(req_3)})
httplib2.Http.request(urlparse.urljoin(self.TEST_URL, 'v2.0/users/2'),
'POST',
'PUT',
body=json.dumps(req_2),
headers=self.TEST_POST_HEADERS) \
.AndReturn((resp_2, resp_2['body']))